Skip to main content

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. Add #key:value metadata filters or #keyword text filters at the end of --query
  • Vector query — use with vector namespaces; array length must match vector_dimension

Synopsis

Options

Put metadata and keyword filters in --query using #key:value and #keyword at the end (e.g. --query "product docs #department:engineering"). On Windows PowerShell, escape vector JSON: --query-vector-json '[0.1,0.2,0.3,0.4,0.5]'.

Examples

Output

Prints JSON from POST /search:
array
Ranked hits, highest score first. Empty when nothing matches.
string
Item id.
number
Similarity score (0–1), rounded to 6 decimal places.
string
Relevance label (for example "High Relevance", "Close Match").
object
Item metadata.
string
Document text for text namespaces. Empty string "" for vector namespaces.
number
Total request time in seconds.
object
Detailed timing breakdown for each search phase, in seconds.
string
"error" on validation failures (HTTP 400).
string
Error description when the request fails.
Example output (text search)
Example output (vector search)

Relevance labels

Exit codes

Important notes

  • Text search requires Ollama running for embeddings
  • --namespaces must include at least one valid namespace name
  • Text queries cannot search vector namespaces (and vice versa)
  • CLI validation errors (missing query) print to stderr without API JSON