feat: add full-text search via Awesomebar - #22
Merged
Conversation
Confidence Score: 4/5The PR is not yet safe to merge because the documentation index can remain stale after an equal-size content deployment that preserves timestamps. The current fingerprint compares only file paths, timestamps, and sizes, so changed Markdown bytes can remain invisible to cache invalidation and Awesome Bar can continue serving obsolete search results. Files Needing Attention: compendium/search.py Reviews (3): Last reviewed commit: "docs: translate the search page to Germa..." | Re-trigger Greptile |
Alt text is prose the author wrote and the reader sees, but the Markdown to plain text conversion dropped it along with every other attribute, so a page could not be found by the caption of the screenshot it shows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kMagMiqVQbMRmbX2zuC5Q
The index was considered current while the number of Markdown files and the newest mtime were unchanged. A deployment that preserves timestamps (rsync -a, tar -xp) can replace a file with one whose mtime is older than another file's, leaving the worker serving results from content that no longer exists until the next unrelated change or a restart. Fingerprint every file with its mtime and size instead. The walk and the stat calls are the same, only the aggregation is gone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kMagMiqVQbMRmbX2zuC5Q
snippet() re-scans a page body, and the sorter builds one for every row it orders, so a short prefix like "s" that matches the whole collection paid for a preview of every page: 48 ms over 2000 pages, of which the previews were 47 ms. Rank first over the metadata alone, then fetch previews for the twenty rows that survive the role filter: 4.8 ms for the same query. The rank pass stays unbounded on purpose. Roles are filtered after ranking, so a page the reader may open can rank below any number of pages they may not, and a LIMIT on the rank query would silently drop it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kMagMiqVQbMRmbX2zuC5Q
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kMagMiqVQbMRmbX2zuC5Q
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kMagMiqVQbMRmbX2zuC5Q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on frappe/frappe#41931
Resolves #8