search_passages
Search documents full-text and return bounded passages around each hit. Locate and skim evidence across many documents without flooding context, then page further using returned offsets.
Instructions
Search documents full-text and return bounded text passages around each hit instead of whole documents. The window is anchored on the server's own highlighted phrase (falling back to the first verbatim term, then the document head), so the returned passage contains the actual hit even when stemming matched a word variant. Queries that the server rejects with an HTTP 400 are retried once with a defensively rewritten query (apostrophes and stray quotes removed); such responses carry query_sanitized: true. Returns document id, title, score, offset, content_length, and the highlighted snippet. Use this to locate and skim evidence across many documents without flooding context; page further with get_document_content offsets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | ||
| query | Yes | Full-text query (same syntax as query_documents). | |
| window | No | Characters per passage (default 800). | |
| ordering | No | ||
| page_size | No | ||
| max_passages | No | Maximum passages to return (default 5). | |
| storage_path | No | ||
| correspondent | No | ||
| document_type | No | ||
| paperless_filters | No | ||
| created__date__gte | No | ||
| created__date__lte | No | ||
| custom_fields__icontains | No |