search
Perform a hybrid search combining vector similarity, keyword matching, filename search, and metadata search. Candidates from all strategies are merged, scored, filtered, and ranked.
The search pipeline works in three stages:
- Candidate collection — run vector, filename, metadata, and keyword searches in parallel
- Scoring — combine signals using max-signal-wins with agreement boosts
- Ranking — apply diversity penalties, exact-match boosts, and tag filtering
Parameters
query_vector
Embedding vector for the query, produced by encoding the query text with the same model used to build the index.
enhanced_text
Preprocessed query text for keyword and full-text search. Typically the output
of preprocess_query().
count
Maximum number of results to return.
similarity_threshold
Minimum combined score for a result to be included. Results below this threshold are filtered out.
tags
Filter results to only those containing at least one of the specified tags.
keyword_weight
Manual weight for keyword vs. vector scoring. When not set, the engine uses its internal max-signal-wins scoring.
original_query
The original unprocessed query string. Used for exact-match boosting.
Returns
list[dict] — A list of result dictionaries, each containing:
content(str) — the chunk textscore(float) — the final combined scoremetadata(dict) — chunk metadata includingfilename,section,tagssearch_type(str) — the primary search strategy that found the result