similarity_search.query
Search stored items by semantic similarity and return ranked results with scores and relevance labels.- Text query — string; embedded via your configured provider; search text namespaces. Use
#key:valueand#keywordfor filtering - Vector query — numeric array; search vector namespaces (length must match
vector_dimension)
Search errors return
"status": "error" with HTTP 400. Non-2xx responses raise MoorchehApiError.POST /search — see Search
Parameters
Text string or array of numbers. Text queries support
#key:value metadata filters and #keyword text filters at the end of the string.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
5 in the client (server default is 10 if omitted in raw API calls).Minimum score threshold (0–1). Used when
kiosk_mode is true.When
true, threshold is required and results below the threshold are filtered out.Examples — text search
Example — vector search
Examples — kiosk mode
Returns
Ranked search hits, highest score first. Empty array when nothing matches (including strict metadata filters).
Item id in the namespace.
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. The top content hit may include
summary_text (batch summary for uploaded file chunks).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). Present in MoorchehApiError.body, not in successful responses.Error description when the request fails.
Example return value (text search)
Example return value (vector search)
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 |
Error Handling
Non-2xx responses raiseMoorchehApiError. Search validation errors use HTTP 400 with "status": "error" in the body.
| Status | Cause |
|---|---|
| 400 | Empty query or namespaces, namespace not found, query type mismatch, vector dimension mismatch, invalid top_k, or kiosk_mode without threshold |