Skip to content

feat(search): find-in-page candidates over a whole book - #104

Merged
kdroidFilter merged 1 commit into
masterfrom
feat/find-in-book-candidates
Oct 8, 2026
Merged

kdroidFilter merged 1 commit into
masterfrom
feat/find-in-book-candidates

Conversation

@kdroidFilter

@kdroidFilter kdroidFilter commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Adds SearchEngine.findInBookCandidates(query, bookId) (default null) and its Lucene implementation, used by Zayit's find-in-page to search a whole book, not only its loaded pages.

  • Filter-only query: book lines + per-token literal presence (inner tokens exact, last token prefix, first/lone token through 4-grams).
  • Returns a superset the caller confirms against the line text.
  • null when the index can't answer (book not indexed, or a query too short to filter on): the caller scans the book from the DB.

Tests in LuceneSearchEngineTest.

findInBookCandidates returns the lines of a book that may contain a literal
substring (nikud, final letters and case ignored), for the app to confirm.
Null when the index can't answer: book not indexed, or a query too short to
filter on.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant