Skip to main content
POST
/
api
/
v1
/
vector
/
search
curl -X POST http://localhost:8080/api/v1/vector/search \
  -H 'Content-Type: application/json' \
  -d '{
        "bm25": { "field": "description", "query": "wireless noise cancelling headphones" },
        "k": 10,
        "filter": { "eq": { "field": "category", "value": "electronics" } }
      }'
{
  "status": "success",
  "results": [
    {
      "score": 0.05,
      "vector": {
        "id": "doc-1",
        "attributes": {
          "vector": [
            1,
            2,
            3
          ],
          "category": "electronics"
        }
      }
    }
  ]
}

Body

Request body for searching a collection. Provide exactly one of vector (approximate nearest neighbor search) or bm25 (full-text BM25 search); they are mutually exclusive.

k
integer<uint32>
required

Number of results to return.

Required range: x >= 1
vector
number<float>[]

Query vector for ANN search. Must have the same number of dimensions as the collection. Provide either this or bm25.

bm25
object

Full-text BM25 query over a text field. Provide either this or vector.

nprobe
integer<uint32>

Number of posting lists to search for ANN queries. Higher values improve recall at the cost of latency. Optional.

filter
object

A filter expression. Each filter object must contain exactly one operator key. Filters can be nested using and and or.

includeFields
string[]

List of attribute field names to include in results. When omitted, all attributes are returned.

Response

Search results ranked by similarity.

Response containing search results ranked by similarity.

status
string
required
Example:

"success"

results
object[]
required