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
Runs semantic search across one or more namespaces. Provide either--query (text) or --query-vector-json (vector array). Prints ranked results as JSON.
- Text query — embedded via Ollama; use with text namespaces
- Vector query — use with vector namespaces; array length must match
vector_dimension
Synopsis
Options
| Flag | Default | Description |
|---|---|---|
--base-url | http://localhost:8080 | Moorcheh API base URL |
--query | — | Text search query (required if --query-vector-json is not set) |
--query-vector-json | — | JSON array string for vector search |
--namespaces | "" | Comma-separated namespace names (at least one required) |
--top-k | 5 | Max results (server clamps 1–100) |
--threshold | 0.0 | Score threshold (sent to API; filtering requires kiosk_mode, which is API only) |
--metadata-json | {} | JSON object metadata filter (exact key/value match) |
On Windows PowerShell, escape JSON flags:
--metadata-json '{\"team\":\"ai\"}', --query-vector-json '[0.1,0.2,0.3,0.4,0.5]'.Examples
Output
Prints JSON fromPOST /search:
Ranked hits, highest score first. Empty when nothing matches.
Item id.
Similarity score (0–1), rounded to 6 decimal places.
Relevance label (for example
"High Relevance", "Close Match").Item metadata.
Document text for text namespaces. Empty string
"" for vector namespaces.Total request time in seconds.
Detailed timing breakdown for each search phase, in seconds.
"error" on validation failures (HTTP 400).Error description when the request fails.
Example output (text search)
Example output (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 |
Exit codes
| Code | Meaning |
|---|---|
0 | Search completed (including empty results) |
1 | Missing --query, invalid JSON, API error (400), etc. |