v37

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0488273490.0 KB
Collections

Search a Collection

Run a vector/keyword search against a collection and return the raw retrieval hits (distinct, best match first). Uses the same retrieval as an enrich step — semantic, hybrid (weighted Reciprocal Rank Fusion), or exact — but does NOT apply the LLM re-rank that a full enrich step layers on top.

post/v3/collections/search

Request body

collectionNamestring required

The name/path of the collection to search. Must use only letters, digits, underscores, and dots. Each segment must start with a letter or underscore.

querystring required

The text to search with.

topKinteger

Number of distinct results to return (default 1).

searchMode'semantic' | 'exact' | 'hybrid'

Search mode:

  • semantic (default): dense-vector cosine similarity (matches on meaning).
  • exact: case-insensitive substring keyword match.
  • hybrid: weighted Reciprocal Rank Fusion of the semantic and keyword rankings.
includeScoreboolean

Include the retrieval score on each result.

includeSubcollectionsboolean

Also search child collections under collectionName.

scoreThresholdnumber double

Drops results whose score exceeds this value — a 0–2 dissimilarity cutoff (lower = closer), applied to semantic and hybrid modes exactly as an enrich step's scoreThreshold does. Ignored for exact mode. Omit for no threshold filtering (all topK returned); pass 0.6 to mirror the enrich default.

rerankboolean

Apply the same LLM re-rank an enrich step performs over the retrieved candidates. Ignored for exact mode (which is never re-ranked). Off by default; enabling it adds an LLM call per request. When on, each result carries rank/confidence.

Response

The request has succeeded.

collectionNamestring required

The collection that was searched.

searchModestring required

The resolved search mode (semantic, exact, or hybrid).