curl -X POST "http://localhost:8080/search" \
-H "Content-Type: application/json" \
-d '{
"query": [0.01, -0.02, "... match store dimension ..."],
"top_k": 5
}'
{
"results": [
{
"id": "doc-1",
"score": 0.894123,
"label": "Close Match",
"text": "Hello world"
}
]
}
Search
Search
Search the store with a query vector.
POST
/
search
curl -X POST "http://localhost:8080/search" \
-H "Content-Type: application/json" \
-d '{
"query": [0.01, -0.02, "... match store dimension ..."],
"top_k": 5
}'
{
"results": [
{
"id": "doc-1",
"score": 0.894123,
"label": "Close Match",
"text": "Hello world"
}
]
}
Overview
Search the local store using a numeric query vector. The query length must match the store dimension.curl -X POST "http://localhost:8080/search" \
-H "Content-Type: application/json" \
-d '{
"query": [0.01, -0.02, "... match store dimension ..."],
"top_k": 5
}'
{
"results": [
{
"id": "doc-1",
"score": 0.894123,
"label": "Close Match",
"text": "Hello world"
}
]
}
Result fields
| Field | Description |
|---|---|
id | Matched item id |
score | Similarity score (0–1), rounded to 6 decimals |
label | Human-readable relevance label |
text | Stored text, if any |
The CLI and Python SDK can embed plain-text queries locally before calling this endpoint. See CLI: search and Python: search_text().
Related
Was this page helpful?