optimize plain search

This commit is contained in:
2026-07-13 18:49:24 +02:00
parent 61580d0f15
commit 34d3b38730
3 changed files with 52 additions and 56 deletions
+3 -1
View File
@@ -71,7 +71,9 @@ returns ranked, highlighted excerpts grouped by document. Plain searches match
all whitespace-separated terms without interpreting operators. Set `syntax` to
`fts5` for phrases, `OR`, `NOT`, and prefix expressions. Each result includes
the containing chunk's character offsets, which can be passed to
`read_document_excerpt` to retrieve more surrounding context.
`read_document_excerpt` to retrieve more surrounding context. Search ranks a
bounded pool of chunk matches so broad queries remain responsive; as a result,
a document with many highly ranked passages may occupy multiple candidates.
`read_document_excerpt(path, offset=0, max_chars=4000)` reads a bounded range
and returns previous and next offsets. Responses are capped at 20,000