Skip to main content
POST
/
collections
/
{collectionName}
/
query
curl --request POST \
  --url https://{projectHost}/collections/{collectionName}/query \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "size": 2,
  "query": {
    "queryString": {
      "query": "example-field1:example-value"
    }
  }
}
'
{
  "took": 10,
  "maxScore": 1,
  "total": 2,
  "docs": [
    {
      "collection": "example-collection-name",
      "score": 1,
      "doc": {
        "example-field1": "example-value1",
        "example-field2": [
          0.1,
          0.2,
          0.3
        ]
      }
    },
    {
      "collection": "example-collection-name",
      "score": 0.9,
      "doc": {
        "example-field1": "example-value2",
        "example-field2": [
          0.4,
          0.5,
          0.6
        ]
      }
    }
  ],
  "isDocsInline": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.lambdadb.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Project API Key.

Path Parameters

collectionName
string
required

Collection name.

Body

application/json
query
object
required

Query object. For managed embedding vector fields, use knn.queryText. For unmanaged vector fields, use knn.queryVector.

size
integer

Number of documents to return. Note that the maximum number of documents is 100.

consistentRead
boolean
default:false

If your application requires a strongly consistent read, set consistentRead to true. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value.

includeVectors
boolean
default:false

If your application need to include vector values in the response, set includeVectors to true.

sort
object[]

List of field name, sort direction pairs.

fields
object

An object to specify a list of field names to include and/or exclude in the result.

partitionFilter
PartitionFilter · object

Response

Documents selected by query.

took
integer
required

Elapsed time in milliseconds.

total
integer
required

Total number of documents returned.

docs
object[]
required

List of documents.

isDocsInline
boolean
required

Whether the list of documents is included.

maxScore
number

Maximum score.

docsUrl
string

Optional download URL for the list of documents.