Documentation Index
Fetch the complete documentation index at: https://docs.moorcheh.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Search stored items by semantic similarity and return ranked results with scores and relevance labels.- Text query — pass a string; query is embedded via Ollama; search text namespaces
- Vector query — pass a numeric array; search vector namespaces (length must match each namespace’s
vector_dimension)
Search errors return
"status": "error" (not "failure") with HTTP 400. Non-2xx responses raise MoorchehApiError.Method
API
POST /search — see Search
Payload
Text string or array of numbers. Text queries are embedded with Ollama. Vector queries must be non-empty and match namespace dimension.
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.Optional metadata filter. Only items whose metadata matches all key/value pairs exactly are considered.
When
true, threshold is required and results below the threshold are filtered out.Example — text search
Example — vector search
Example — kiosk mode
Returns
Ranked search hits, highest score first. Empty array when nothing matches (including strict metadata filters).
Item id in the namespace.
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.
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 |
Errors
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 |