search_sections
Retrieve whole note sections instead of isolated chunks: promotes hybrid search hits to their enclosing sections and returns top sections with citations and optional snippets.
Instructions
Section-level retrieval. Composes the v1 hybrid (semantic + BM25 + RRF) pipeline with a chunk-to-section promotion step: runs hybrid with an inflated top_k = limit × 5, promotes each chunk hit to its enclosing section, dedupes by (note, section anchor), scores each section as the MAX of its constituent chunks, tie-breaks by chunk_id_first ASC, and returns the top limit sections. Each hit carries an 8-field citation packet (D-01) with a non-empty section heading_path PLUS the section anchor, score, contributing chunk_ids, and an optional snippet from the best-scoring chunk. Use when you want WHOLE-SECTION context, not a chunk window.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | No | ||
| limit | No | ||
| query | Yes | ||
| vaults | No | ||
| max_chars | No | Global UTF-16 body character budget. Sections defaults to 6000; zero excludes body text. Metadata is always body-free. | |
| projection | No | Optional v2 projection; sections requires heading_paths. Defaults to the legacy response. | |
| heading_paths | No | Exact heading paths on the anchor, or filters on section-search results. | |
| recency_weight | No | ||
| authority_weight | No | ||
| include_superseded | No | ||
| include_observations | No | Include explicitly categorized statements when the derived source hash is fresh; preserves provenance and shares the body budget. |