Use the LambdaDB Migration CLI to migrate an Elasticsearch index into LambdaDB. The CLI inventories the Elasticsearch mapping, generates an editable LambdaDB mapping, creates the target LambdaDB collection when needed, reads documents with Elasticsearch point-in-time pagination, writes LambdaDB documents, saves local checkpoints, and validates migrated records before cutover.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.
Elasticsearch support is available in LambdaDB Migration CLI
v0.1.5 and later. If your installed CLI does not show lambdadb-migration elasticsearch --help, install a newer release before following this guide.indexConfigs.
What the CLI supports
| Elasticsearch source | LambdaDB target | Migration behavior |
|---|---|---|
| Index | Collection | Migrate one Elasticsearch index into one LambdaDB collection. |
_id | Document id | Copy Elasticsearch _id as a LambdaDB string document ID. |
_source fields | Document fields | Copy stored fields. Nested objects are flattened into dot-path payload fields, then normalized for LambdaDB field names through the generated mapping. |
text field | text index | Generate a LambdaDB text index for searchable full-text fields. |
keyword, constant_keyword, wildcard | keyword index | Generate LambdaDB keyword indexes for exact filters, IDs, categories, tags, and sort keys. |
| Numeric fields | long or double index | Map integer-like fields to long and floating-point fields to double. |
date, date_nanos | datetime index | Generate a LambdaDB datetime index. Review source values before writing because the CLI does not rewrite date formats. |
boolean field | boolean index | Copy JSON booleans directly. |
dense_vector field | vector index | Generate an unmanaged LambdaDB vector field with mapped dimensions and similarity. Dense vectors are fetched explicitly with Elasticsearch search fields. |
nested field | object index | Store nested values as JSON payload fields and warn that nested query semantics require application-query review. |
What still needs review
Review these features before cutover because the CLI migrates data and generated LambdaDB index configs, not Elasticsearch runtime behavior:- Elasticsearch Query DSL, aggregations, scripts, runtime fields, scoring scripts, and rescoring logic
- custom analyzers, token filters, synonyms, normalizers, and language-specific index settings
- nested query semantics, parent-child relationships, join fields, and field collapsing
- index templates, aliases, data streams, ILM policies, and ingest pipelines
semantic_text, ELSER, model inference pipelines, and other Elasticsearch-managed semantic features- application code that expects Elasticsearch response shapes, shard metadata, highlights, or aggregations
queryString, knn, sparseVector, bool, or hybrid queries. Then review the generated LambdaDB mapping around those queries instead of copying every Elasticsearch mapping field mechanically.
Step 1: Set credentials
LambdaDB Cloud uses region-specific API base URLs. Use the base URL, project name, and project API key shown for your project in the LambdaDB Cloud console. Do not assume a global default URL or a fixed project name.
--elasticsearch.username and --elasticsearch.password.
Step 2: Generate inventory and mapping
Run the inventory command against the Elasticsearch endpoint and index:nested fields that need query rewrite review, and PIT checkpoint expiry.
Step 3: Review the mapping
Review the generated mapping before migration:- confirm the target LambdaDB collection name
- remove payload index configs for fields you only need to store
- check generated renames for dotted fields such as
metadata.source - confirm
dense_vectordimensions and similarity - confirm
dateanddate_nanosvalues in_sourceare compatible with LambdaDBdatetimefields, or edit the mapping before creating the collection - add explicit field decisions for Elasticsearch multi-fields such as
title.keywordif your application depends on exact-match behavior
The CLI maps Elasticsearch
l2_norm vector similarity to LambdaDB euclidean. Elasticsearch cosine, dot_product, and max_inner_product map directly.Step 4: Run a dry run
Run a dry run to validate the source inventory and mapping without writing documents:Step 5: Run the migration
Run the migration with validation enabled:search_after, and sorts by _shard_doc. It stores the latest PIT ID and search_after values in the local checkpoint.
Step 6: Validate results
Validation compares the accepted record count against the Elasticsearch inventory count, fetches sampled migrated documents from LambdaDB with strongly consistent reads, and compares sampled fields. Use a validation report for review:JSON
JSON
Step 7: Cut over safely
Run the LambdaDB path in parallel before replacing production Elasticsearch traffic:- Backfill historical documents.
- Replay writes that happened during the backfill window.
- Dual-write new updates to Elasticsearch and LambdaDB for a short verification period.
- Compare representative query results and latency.
- Switch read traffic to LambdaDB.
- Keep Elasticsearch available until rollback is no longer needed.
Elasticsearch references
Related docs
Migration CLI
Learn the shared migration workflow, validation behavior, and checkpoint behavior.
Create a collection
Define the LambdaDB index configuration for migrated fields.
Query string search
Rewrite Elasticsearch lexical queries to LambdaDB query string syntax.
Hybrid query
Combine lexical and vector search after migration.