Skip to main content
A search query, or query, is a request for information about data in LambdaDB collections. LambdaDB supports several search methods:
  • Search for exact values: search for exact values or ranges of numbers, dates, IPs, or strings.
  • Full-text search: use full text queries to query unstructured textual data and find documents that best match query terms.
  • Vector search: store vectors in LambdaDB and use approximate nearest neighbor (ANN) to find vectors that are similar, supporting use cases like semantic search.
If you use managed embedding vector fields, see Managed embeddings for the current supported providers and models. Common parameters for the request body of a query are as follows:
Depending on your data and your query, you may get fewer than size results. This happens when size is larger than the number of possible matching documents for your query.
Setting includeVectors (or include_vectors in Python) to true will increase response size significantly, especially for high-dimensional vectors. Use this option only when vector data is specifically needed for your application.
include is applied first, and then exclude is applied to the included fields when you set both in the fields parameter.
LambdaDB is eventually consistent by default, so there can be a slight delay before new or changed documents are visible to queries. If your application requires strong (read-after-write) consistency, set consistentRead (or consistent_read in Python) to true when querying data from a collection, at the expense of potential higher latency and cost.
Query results are returned in the following format:

Example

The response will look like this:
Matched documents are ordered by similarity from most similar to least similar by default. Similarity is expressed as a score, and it is calculated based on the BM25 algorithm for full-text search and the configured similarity metric for vector search.