Search
Search
Semantic search across one or more namespaces using a text or vector query.
POST
Overview
Search stored items by semantic similarity and return ranked results with scores and relevance labels.- Text query — query string is embedded via your configured provider; search text namespaces
- Vector query — pass a numeric array; search vector namespaces (length must match each namespace’s
vector_dimension)
#key:value and #keyword syntax at the end of the query (same as cloud Moorcheh).
Search errors return
"status": "error" (not "failure") with HTTP 400.Headers
Must be
application/jsonBody
Text string or array of numbers. For text queries, include metadata and keyword filters using
#key:value and #keyword syntax at the end of the query.Non-empty list of namespace names to search. Each namespace must exist and match the query type (text vs vector).
Maximum number of results to return. Clamped to 1–100. Default is
10 if omitted.Minimum score threshold (0–1). Used when
kiosk_mode is true.When
true, threshold is required and results below the threshold are filtered out.Advanced filtering
Metadata filters
Use#key:value at the end of the query to filter by stored metadata:
#department:engineering— items wheredepartmentequalsengineering(case-insensitive)#category:tech— items wherecategoryequalstech
Keyword filters
Use#keyword (no colon) to require that word in the result text:
#important— result text must containimportant#python— result text must containpython
Combined example
authentication, filters metadata category=security, then keeps only hits whose text contains important.
For vector search, the
query array length must match vector_dimension for each namespace (for example 5 or 768 depending on how the namespace was created).Response fields
Ranked search hits, highest score first. Empty array when nothing matches (including strict metadata or keyword filters).
Item id in the namespace (for file upload:
{file_id}_chunk_{n} or {file_id}_summary_{batch}).Namespace that owns this result.
Similarity score between 0 and 1, rounded to 6 decimal places.
Human-readable relevance label derived from the score (see table below).
Metadata stored with the item. For the top relevant content chunk, may include
summary_chunk_id (bare id) and summary_text (batch summary fetched automatically). Uploaded file chunks also include file_id, filename, source, etc.Document text for text namespace hits. Empty string
"" for vector namespace hits.Total request time in seconds.
Detailed timing breakdown for each search phase, in seconds.
"error" on validation or search failures (HTTP 400).Error description when the request fails.
Relevance labels
| Score range | Label |
|---|---|
| ≥ 0.894 | Close Match |
| ≥ 0.632 | Very High Relevance |
| ≥ 0.447 | High Relevance |
| ≥ 0.316 | Good Relevance |
| ≥ 0.224 | Low Relevance |
| ≥ 0.1 | Very Low Relevance |
| < 0.1 | Irrelevant |
Summary enrichment
For the top search hit (or the second hit when the first is a summary chunk), the API fetches the linked batch summary and addssummary_text to that result’s metadata. Only one result per search is enriched. /answer uses the same behavior for RAG context.