Skip to main content
LambdaDB currently supports nine types of indexes. Note that the whole document is stored as is regardless of its existence in index configurations, but being stored does not necessarily mean it is searchable.
The dot (.) character cannot be used as a field name, and you can only add indexes to existing collections. Modifying or deleting existing indexes is not supported.

text

This type is for full-text values, such as the body of an email or the description of a product. These full-text values are analyzed by passing them through an analyzer to convert the string into a list of individual terms before being indexed. The analysis process allows LambdaDB to search for individual words within each full text field. text indexes are best suited for unstructured but human-readable content. If you need to index structured content such as email addresses, hostnames, status codes, or tags, you should rather use a keyword index. Choose one or more supported analyzers for each text field. Omitting analyzers uses ["standard"]. LambdaDB applies every analyzer you select; it does not automatically detect the language. See Choose text analyzers for single-language and multilingual selection, configuration examples, and the tradeoffs of combining analyzers.

keyword

keyword type is used for structured content such as IDs, email addresses, hostnames, status codes, zip codes, or tags. Use keyword indexes for sorting, exact-value filters, and keyword facets.
Keyword values longer than the indexing limit remain stored but are not indexed for filtering, sorting, or facets. This applies to each value in an array and does not impose the same limit on text fields. See Limits for character counting and other schema constraints.
You can also store multiple keyword values as an array for fields like tags or categories. Each distinct indexed value contributes once per document to a facet. Array sorting uses the smallest value for ascending order and the largest for descending order.

long

This type is for a signed 64-bit integer with a minimum value of −263-2^{63} and a maximum value of 263−12^{63}-1. long indexes are optimized for scoring, sorting, and range queries.

double

This type is for a double-precision 64-bit IEEE 754 floating point number, restricted to finite values. double indexes are optimized for scoring, sorting, and range queries.

boolean

boolean indexes accept JSON true and false values, but can also accept strings which are interpreted as either true or false.

datetime

This type is for date and time in RFC 3339 format. datetime indexes are optimized for sorting and range queries.

vector

The vector type indexes dense vectors of numeric values. vector indexes are primarily used for k-nearest neighbor (kNN) search. The vector type does not support aggregations or sorting. You add a vector field as an array of numeric values. A kNN search finds the k nearest vectors to a query vector, as measured by a similarity metric. Dense vector fields support the cosine and euclidean similarity metrics within the dimension limits. For caller-provided vector fields, metric names are case-sensitive; omitting similarity selects cosine. Document and query vectors must match the field’s dimensions and contain only finite numbers. Cosine vectors must have nonzero magnitude. LambdaDB supports two vector field modes:
  • vector fields with caller-provided values, where you send vector values directly
  • native embedding vector fields, where LambdaDB generates vector values from text or image source fields
LambdaDB also supports multi-field vector search, allowing you to perform kNN searches across multiple vector fields simultaneously within a single query. This enables complex semantic search scenarios where you can combine different types of embeddings (e.g., text embeddings, image embeddings) in one search operation.

Native embedding vector fields

Add an embedding block to let LambdaDB generate vectors from text or image fields in the document. For supported models and configuration rules, see Native embeddings.
For native embedding vector fields:
  • embedding.provider, embedding.model, and embedding.sources are required
  • source fields are dotted paths in the stored document and do not need their own index configs
  • set dimensions and similarity inside embedding, not at the top level of the field
  • search with knn.queryText or knn.queryInputs; knn.queryVector is also accepted and skips inference
  • bulk upsert never generates embeddings; a document with a present source must supply the vector directly

sparseVector

The sparseVector type is designed for storing and indexing sparse vectors, where most elements are zero or missing. Unlike dense vectors, sparse vectors only store non-zero values along with their corresponding indexes. sparseVector type only supports the dot_product distance metric.

object

JSON documents are hierarchical in nature: the document may contain inner objects which, in turn, may contain inner objects themselves. Internally, this document is indexed as a simple, flat list of key-value pairs. The fields within the object can be of any data type, including object. objectIndexConfigs should be specified in order to index the fields inside the object.

Complete example configuration

Here’s a comprehensive example that demonstrates all index types:

Supported analyzers

LambdaDB supports 49 fixed presets for text fields. The recommended SDK, CLI, MCP server, and Migration CLI releases accept all 49 names. All names select fixed presets through analyzers; custom pipelines, tokenizers, filters, stopword lists, and analyzer options are not configurable. The keyword analyzer on a text field does not provide the sorting or facet behavior of a keyword field type. nepali, tamil, and telugu are Lucene extensions, not shared Elasticsearch/OpenSearch analyzer support. Use the lowercase names above. Duplicate analyzer names, including case variants, are rejected with HTTP 400. Omit analyzers for the default, or select at least one analyzer; an empty list does not use the default. See Choose text analyzers before combining analyzers or migrating an existing field.
Ask in the LambdaDB community Slack or email support@lambdadb.ai if you need an analyzer not listed above.

Supported similarity metrics

These options apply to dense vector fields. Dense dot_product and max_inner_product are not supported. Changing an inner-product workload to cosine can change ranking when vector magnitudes carry information; validate the retrieval objective before migrating. The sparseVector type continues to use dot_product without a unit-length requirement. Dense-vector query results contain relevance scores, not raw distances or inner products. Validate score thresholds separately when migrating between systems.