> ## 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.

# Migrate from Qdrant

> Use the LambdaDB Migration CLI to move Qdrant collections, points, vectors, sparse vectors, and payload indexes to LambdaDB.

Use the LambdaDB Migration CLI to migrate Qdrant collections into LambdaDB. The CLI inventories your Qdrant collection, generates an editable LambdaDB mapping, creates the target LambdaDB collection when needed, streams points as LambdaDB documents, saves local checkpoints, and validates migrated records before cutover.

Qdrant models searchable records as **points** made of an `id`, one or more vectors, and an optional `payload`. LambdaDB models records as **documents**: each document is stored as JSON, while searchable fields are declared in the collection's `indexConfigs`.

## What the CLI supports

| Qdrant data | LambdaDB target | Migration behavior |
| :- | :- | :- |
| Collection | Collection | Keep one LambdaDB collection per Qdrant collection unless you are also changing tenancy or isolation boundaries. |
| Point ID | Document `id` | Numeric Qdrant IDs are converted to strings. UUID IDs remain the same string value. |
| Unnamed dense vector | `vector` field | The generated mapping uses `dense` as the default target field. |
| Named dense vector | `vector` field | Each Qdrant named vector maps to its own LambdaDB vector field. |
| Sparse vector | `sparseVector` field | Qdrant `indices` and `values` arrays are converted to a LambdaDB sparse object. |
| Payload | Document fields | Payload fields are flattened by default. Indexed payload fields become LambdaDB index configs. |
| Payload index | `indexConfigs` field | Supported types include `keyword`, `text`, `long`, `double`, `boolean`, `datetime`, and `object`. |

> [!WARNING]
>
> Qdrant multi-vectors and Manhattan distance collections require workload-specific review. The CLI detects them and rejects the default migration path instead of silently creating a misleading LambdaDB schema.

## Step 1: Install the CLI

Follow [Install the Migration CLI](https://docs.lambdadb.ai/guides/migrations/overview.md#install-the-cli) to install stable `v0.1.9` using Homebrew or the standalone installer.

Check the Qdrant command:

```bash theme={null}
lambdadb-migration qdrant --help
```

## Step 2: Set credentials

> [!NOTE]
>
> LambdaDB Cloud uses region-specific API base URLs. Use your project's **base URL** and **project name**, together with a **project API key** created in its **API Keys** tab. Project creation does not automatically issue a key; save the full value when you create it, because it is shown only once. See [API key management](https://docs.lambdadb.ai/guides/get-started/quickstart.md#manage-api-keys). Do not assume a global default URL or a fixed project name.

Set your LambdaDB connection values:

```bash theme={null}
export LAMBDADB_BASE_URL="YOUR_REGION_BASE_URL"
export LAMBDADB_PROJECT_NAME="YOUR_PROJECT_NAME"
export LAMBDADB_PROJECT_API_KEY="YOUR_PROJECT_API_KEY"
```

If your Qdrant deployment requires an API key, pass it with `--qdrant.api-key`.

## Step 3: Generate inventory and mapping

Run the inventory command against the Qdrant gRPC endpoint:

```bash theme={null}
lambdadb-migration inventory qdrant \
  --qdrant.url http://localhost:6334 \
  --qdrant.collection articles \
  --output qdrant-inventory.yaml
```

The output includes the source inventory and an editable LambdaDB mapping:

```yaml theme={null}
mapping:
  target:
    collection: articles
    createCollection: true
  vectors:
    dense:
      targetField: dense
      dimensions: 1536
      similarity: cosine
  sparseVectors:
    sparse:
      targetField: sparse
  payload:
    mode: flatten
    rename:
      metadata.url: metadata_url
    indexConfigs:
      tenant_id:
        type: keyword
      title:
        type: text
      metadata_url:
        type: keyword
  ids:
    targetField: id
```

Review the generated mapping before running the migration. In particular, check vector dimensions, vector similarities, payload index types, renamed dotted fields, and the target collection name.

> [!NOTE]
>
> Generated mappings set `target.createCollection: true` by default. With that setting, the migration creates the LambdaDB collection if it is missing, then begins writing documents. Transient write failures use the CLI's retry policy; no collection-status polling is performed.

## Step 4: Run a dry run

Use a dry run to validate the mapping and inspect the planned migration without writing documents:

```bash theme={null}
lambdadb-migration qdrant \
  --qdrant.url http://localhost:6334 \
  --qdrant.collection articles \
  --lambdadb.base-url "$LAMBDADB_BASE_URL" \
  --lambdadb.project-name "$LAMBDADB_PROJECT_NAME" \
  --lambdadb.api-key "$LAMBDADB_PROJECT_API_KEY" \
  --lambdadb.collection articles \
  --mapping-file qdrant-inventory.yaml \
  --migration.dry-run
```

## Step 5: Run the migration

Run the migration with validation enabled:

```bash theme={null}
lambdadb-migration qdrant \
  --qdrant.url http://localhost:6334 \
  --qdrant.collection articles \
  --lambdadb.base-url "$LAMBDADB_BASE_URL" \
  --lambdadb.project-name "$LAMBDADB_PROJECT_NAME" \
  --lambdadb.api-key "$LAMBDADB_PROJECT_API_KEY" \
  --lambdadb.collection articles \
  --mapping-file qdrant-inventory.yaml \
  --migration.write-mode bulk \
  --migration.validate \
  --migration.validation-report validation-report.json
```

Migration progress is written to stderr with accepted count, percent, batch size, rate, and elapsed time.

The CLI stores checkpoints under `.lambdadb-migration/checkpoints` by default. If the command is interrupted, rerun the same command to resume. Use `--migration.restart` to ignore an existing checkpoint and start from the beginning.

Completed runs skip re-reading and uploading documents on rerun. To migrate new source data, use `--migration.restart`. See [checkpoint and validation behavior](https://docs.lambdadb.ai/guides/migrations/overview.md#common-cli-behavior), including locally saved validation samples.

Use `--migration.create-collection=false` when the target LambdaDB collection already exists and the migration should not create it.

## Step 6: Review validation

`--migration.validate` checks the accepted record count, fetches a sample of migrated documents from LambdaDB using strongly consistent reads, and compares sampled fields.

`--migration.validation-report` writes the validation result as JSON. The report includes source count, accepted records, LambdaDB `numDocs`, sampled IDs, compared sample count, query overlap results, and validation errors.

> [!NOTE]
>
> `numDocs` is reported for visibility, but sample fetch and field comparison are the stronger validation checks for read-after-write confirmation.

For dense-vector migrations, add query overlap checks:

```bash theme={null}
lambdadb-migration qdrant \
  --qdrant.url http://localhost:6334 \
  --qdrant.collection articles \
  --lambdadb.base-url "$LAMBDADB_BASE_URL" \
  --lambdadb.project-name "$LAMBDADB_PROJECT_NAME" \
  --lambdadb.api-key "$LAMBDADB_PROJECT_API_KEY" \
  --lambdadb.collection articles \
  --mapping-file qdrant-inventory.yaml \
  --migration.validate \
  --migration.validation-report validation-report.json \
  --migration.query-overlap
```

By default, `--migration.query-overlap` reports dense-vector overlap without failing the migration. Set `--migration.query-overlap-min-ratio` above `0` to require a minimum average overlap.

## Mapping details

The Migration CLI generates this default distance mapping for dense vector fields:

| Qdrant distance | Generated setting and target support |
| :- | :- |
| `Cosine` | `cosine` |
| `Dot` | The CLI generates `dot_product`, which is not supported for dense vectors; the migration is rejected before any LambdaDB request. |
| `Euclid` | `euclidean` |
| `Manhattan` | The CLI generates `unsupported:manhattan`; the migration is rejected. Re-evaluate the embedding/search setup before migrating. |

The inventory reports each vector's generated `similarity` with the original `sourceSimilarity`, and `warnings` names every vector whose metric or dimensions LambdaDB cannot store. Migration runs, including `--migration.dry-run`, validate the mapping first and exit with an error naming the vector and metric; the CLI never converts a similarity on its own. To migrate such a vector, set `vectors.<source vector>.similarity` to `cosine` or `euclidean` in the mapping file and pass it with `--mapping-file`.

Review generated mappings against the [dense-vector requirements](https://docs.lambdadb.ai/guides/collections/index-types.md#vector): the [supported dimension range](https://docs.lambdadb.ai/guides/get-started/limits.md#collections-and-schema) and `cosine` or `euclidean`. `Dot` has no direct dense-vector mapping. Use `cosine` only after establishing that the changed metric preserves your intended ranking; vector magnitudes can carry information that cosine discards. Edit the mapping before collection creation and validate scores and ranking. Dense `max_inner_product` is not supported either.

The following field-mapping examples use synthetic 64-dimensional vectors. Preserve the full vectors and dimensions of your actual data when migrating; dense fields must fit the [dimension limits](https://docs.lambdadb.ai/guides/get-started/limits.md#collections-and-schema).

For a Qdrant point with a single dense vector:

```json Qdrant point theme={null}
{
  "id": 1,
  "vector": [
    0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34,
    0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12,
    0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56,
    0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34,
    0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12,
    0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56,
    0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34,
    0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12
  ],
  "payload": {
    "tenant_id": "acme",
    "title": "Refund policy",
    "body": "Refunds are available within 7 days.",
    "created_at": "2026-05-01T10:00:00Z"
  }
}
```

the CLI writes a LambdaDB document like this:

```json LambdaDB document theme={null}
{
  "id": "1",
  "tenant_id": "acme",
  "title": "Refund policy",
  "body": "Refunds are available within 7 days.",
  "created_at": "2026-05-01T10:00:00Z",
  "dense": [
    0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34,
    0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12,
    0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56,
    0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34,
    0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12,
    0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56,
    0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12, 0.34,
    0.56, 0.12, 0.34, 0.56, 0.12, 0.34, 0.56, 0.12
  ]
}
```

For Qdrant named vectors:

```json Qdrant point with named vectors theme={null}
{
  "id": 1,
  "vector": {
    "title_dense": [
      0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2,
      0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1,
      0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3,
      0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2,
      0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1,
      0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3,
      0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2,
      0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1
    ],
    "body_dense": [
      0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5,
      0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4,
      0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6,
      0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5,
      0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4,
      0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6,
      0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5,
      0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4
    ]
  },
  "payload": {
    "title": "Refund policy",
    "body": "Refunds are available within 7 days."
  }
}
```

the CLI writes separate LambdaDB vector fields:

```json LambdaDB document theme={null}
{
  "id": "1",
  "title": "Refund policy",
  "body": "Refunds are available within 7 days.",
  "title_dense": [
    0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2,
    0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1,
    0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3,
    0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2,
    0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1,
    0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3,
    0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1, 0.2,
    0.3, 0.1, 0.2, 0.3, 0.1, 0.2, 0.3, 0.1
  ],
  "body_dense": [
    0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5,
    0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4,
    0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6,
    0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5,
    0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4,
    0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6,
    0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4, 0.5,
    0.6, 0.4, 0.5, 0.6, 0.4, 0.5, 0.6, 0.4
  ]
}
```

For Qdrant sparse vectors, the CLI converts `indices` and `values` to an object whose keys are index strings:

```json Qdrant sparse vector theme={null}
{
  "indices": [1, 42],
  "values": [0.22, 0.8]
}
```

```json LambdaDB sparse vector theme={null}
{
  "sparse": {
    "1": 0.22,
    "42": 0.8
  }
}
```

## Reduce application changes with SDK compatibility

After data is in LambdaDB, Python and TypeScript applications can use LambdaDB's Qdrant compatibility clients as a bridge before rewriting every query to native LambdaDB APIs.

The compatibility clients support common Qdrant-style calls such as collection creation, dense-vector upsert, dense-vector query, retrieve, delete, filtered scroll, and unfiltered count. They are not full Qdrant client replacements, and unsupported behavior raises an explicit error where possible.

> [card] [Qdrant SDK compatibility](https://docs.lambdadb.ai/guides/migrations/qdrant/qdrant-sdk-compatibility.md)
>
> Use Python `lambdadb.compat.qdrant` or TypeScript `@functional-systems/lambdadb/compat/qdrant` to reduce application code changes.

## Rewrite vector search

A Qdrant query against a named vector:

```python Python theme={null}
from qdrant_client import models

qdrant.query_points(
    collection_name="articles",
    query=query_vector,
    using="dense",
    limit=10,
    query_filter=models.Filter(
        must=[
            models.FieldCondition(
                key="tenant_id",
                match=models.MatchValue(value="acme"),
            )
        ]
    ),
    with_payload=True,
)
```

becomes a LambdaDB `knn` query:

```python Python theme={null}
results = coll.query(
    query={
        "knn": {
            "field": "dense",
            "queryVector": query_vector,
            "k": 10,
            "filter": {
                "queryString": {
                    "query": '"acme"',
                    "defaultField": "tenant_id",
                }
            },
        }
    },
    size=10,
)
```

When using LambdaDB native embeddings, send query text instead of a vector:

```python Python theme={null}
results = coll.query(
    query={
        "knn": {
            "field": "bodyEmbedding",
            "queryText": "refund policy",
            "k": 10,
        }
    },
    size=10,
)
```

## Rewrite filters

Qdrant filters commonly use `must`, `must_not`, and `should` clauses. In LambdaDB, use a `bool` query when the filter logic is larger than a single query string.

```json Qdrant filter theme={null}
{
  "must": [
    { "key": "tenant_id", "match": { "value": "acme" } },
    { "key": "created_at", "range": { "gte": "2026-01-01T00:00:00Z" } }
  ],
  "must_not": [
    { "key": "status", "match": { "value": "deleted" } }
  ]
}
```

```json LambdaDB bool query theme={null}
{
  "bool": [
    {
      "queryString": {
        "query": "tenant_id:acme"
      },
      "occur": "filter"
    },
    {
      "queryString": {
        "query": "created_at:[2026-01-01T00:00:00Z TO *]"
      },
      "occur": "filter"
    },
    {
      "queryString": {
        "query": "status:deleted"
      },
      "occur": "must_not"
    }
  ]
}
```

Use field types intentionally:

| Qdrant payload use | LambdaDB index type |
| :- | :- |
| Exact string match, tags, IDs, tenant IDs | `keyword` |
| Natural-language matching | `text` |
| Integer range or sorting | `long` |
| Floating-point range or sorting | `double` |
| Date/time range or sorting | `datetime` |
| Boolean flags | `boolean` |
| Nested JSON kept as a searchable object | `object` |

## Rewrite hybrid search

Qdrant hybrid queries often use `prefetch` plus RRF fusion across dense and sparse vectors. These query examples use synthetic 64-dimensional dense vectors; replace them with query embeddings from the migrated field's model and with the field's full dimensions.

```json Qdrant hybrid query theme={null}
{
  "prefetch": [
    {
      "query": { "indices": [1, 42], "values": [0.22, 0.8] },
      "using": "sparse",
      "limit": 20
    },
    {
      "query": [
        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8
      ],
      "using": "dense",
      "limit": 20
    }
  ],
  "query": { "fusion": "rrf" },
  "limit": 10
}
```

In LambdaDB, express the same dense/sparse fusion with `rrf`:

```json LambdaDB hybrid query theme={null}
{
  "rrf": [
    {
      "sparseVector": {
        "field": "sparse",
        "queryVector": {
          "1": 0.22,
          "42": 0.8
        }
      }
    },
    {
      "knn": {
        "field": "dense",
        "queryVector": [
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8
        ],
        "k": 20
      }
    }
  ]
}
```

You can also combine lexical and vector relevance:

```json LambdaDB lexical + vector hybrid query theme={null}
{
  "l2": [
    {
      "queryString": {
        "query": "refund policy",
        "defaultField": "body"
      },
      "boost": 0.4
    },
    {
      "knn": {
        "field": "dense",
        "queryVector": [
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
          0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8
        ],
        "k": 20
      },
      "boost": 0.6
    }
  ]
}
```

## Common gotchas

* **IDs**: LambdaDB document IDs are strings. Numeric Qdrant IDs are converted to strings during migration.
* **Field names**: LambdaDB field names cannot contain dots. The generated mapping renames dotted Qdrant payload keys, such as `metadata.url` to `metadata_url`.
* **Schema**: Qdrant can store payload without deciding every searchable field up front. In LambdaDB, decide which fields need indexes before migration.
* **Bulk writes**: Choose regular or bulk upsert based on the [request and document limits](https://docs.lambdadb.ai/guides/get-started/limits.md#requests-and-documents); enforce the returned `sizeLimitBytes` for bulk uploads. Bulk does not generate native embeddings: documents with a present embedding source must supply the vector. See [bulk embedding rules](https://docs.lambdadb.ai/guides/collections/native-embeddings.md#bulk-upsert).
* **Sparse vectors**: Qdrant sparse vectors use separate `indices` and `values`; LambdaDB uses object key-value pairs.
* **Multi-vectors**: Qdrant multi-vectors store matrices for late-interaction models. Plan and validate these workloads separately.
* **Consistency**: LambdaDB uses eventual reads by default, but supports `consistentRead` for strong read-after-write checks. The CLI validation uses strongly consistent sample fetches. For bulk upsert, allow time for documents to become visible after indexing completes.

## Next steps

> [card] [Migration CLI](https://docs.lambdadb.ai/guides/migrations/overview.md)
>
> Review the shared LambdaDB Migration CLI workflow.

> [card] [Qdrant SDK compatibility](https://docs.lambdadb.ai/guides/migrations/qdrant/qdrant-sdk-compatibility.md)
>
> Keep common Qdrant-style Python and TypeScript client calls while migrating application code.

> [card] [Create a collection](https://docs.lambdadb.ai/guides/collections/create-a-collection.md)
>
> Define LambdaDB index configurations for your migrated data.

> [card] [Bulk upsert data](https://docs.lambdadb.ai/guides/documents/bulk-upsert-data.md)
>
> Load larger migrated datasets through the bulk upsert workflow.

> [card] [Hybrid query](https://docs.lambdadb.ai/guides/search/hybrid.md)
>
> Combine lexical, dense vector, and sparse vector search.

## Need help planning your migration?

Not sure how to map your Qdrant workload to LambdaDB? Email [support@lambdadb.ai](mailto:support@lambdadb.ai) or ask in the [LambdaDB community Slack](https://join.slack.com/t/lambdadbcommunity/shared_invite/zt-3sg7565zm-sCTW3odRkEQt~auWUVVsTw) for help with collection design, query compatibility, and migration next steps.

A brief description of your collection and point counts, vector types and dimensions, and the problem you want to solve is enough to start. If useful, include a sanitized query, filter, or CLI error so we can discuss the mapping in concrete terms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.