mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-06 11:28:31 +02:00
* initial commit; fixed anchor links on internal docs pages * add back in absolute paths for links in code comments * fix: update linkchecker include filter to match server port 1314 PR #1629 changed the Hugo server to port 1314 but forgot to update the --include filter, which still matched port 1313. This caused all links to be excluded, making the checker a no-op (0 checked, 82277 excluded). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix url rewrite regex so images are not impacted * Fix links from non-documentation pages * Fix broken links * more broken links * more broken links * broken link * Add srcset width descriptor to .lycheeignore * Ignore URLs that contain a % character * Anchor regex so it matches the entire URL --------- Co-authored-by: kanungle <neil.kanungo@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Abdon Pijpelink <abdon.pijpelink@qdrant.com>
77 lines
2.9 KiB
Markdown
77 lines
2.9 KiB
Markdown
---
|
|
title: From MongoDB
|
|
weight: 80
|
|
---
|
|
|
|
# Migrate from MongoDB to Qdrant
|
|
|
|
## What You Need from MongoDB
|
|
|
|
- **Connection string** — MongoDB URI (e.g., `mongodb://user:pass@host:27017`)
|
|
- **Database name** — the database containing your collection
|
|
- **Collection name** — the collection to migrate
|
|
- **Vector field names** — the names of fields that store vector embeddings
|
|
|
|
<aside role="alert"><strong>Important:</strong> MongoDB does not expose vector dimensions or distance metrics in a way the tool can read automatically. You must create the Qdrant collection manually before running the migration.</aside>
|
|
|
|
## Concept Mapping
|
|
|
|
| MongoDB | Qdrant | Notes |
|
|
| :--- | :--- | :--- |
|
|
| Collection | Collection | One-to-one mapping |
|
|
| Document | Point | Each document becomes a point |
|
|
| Vector field | Vector | Named vectors are preserved |
|
|
| Non-vector fields | Payload | Direct mapping |
|
|
| `_id` (ObjectID or string) | Point ID + Payload | Converted to UUID; original stored in payload |
|
|
|
|
## Run the Migration
|
|
|
|
```bash
|
|
docker run --net=host --rm -it registry.cloud.qdrant.io/library/qdrant-migration mongodb \
|
|
--mongodb.url 'mongodb://localhost:27017' \
|
|
--mongodb.database 'your-database' \
|
|
--mongodb.collection 'your-collection' \
|
|
--mongodb.vector-fields 'embedding' \
|
|
--qdrant.url 'https://your-instance.cloud.qdrant.io:6334' \
|
|
--qdrant.api-key 'your-qdrant-api-key' \
|
|
--qdrant.collection 'your-collection'
|
|
```
|
|
|
|
### With Multiple Vector Fields
|
|
|
|
```bash
|
|
docker run --net=host --rm -it registry.cloud.qdrant.io/library/qdrant-migration mongodb \
|
|
--mongodb.url 'mongodb+srv://user:pass@cluster.mongodb.net' \
|
|
--mongodb.database 'your-database' \
|
|
--mongodb.collection 'your-collection' \
|
|
--mongodb.vector-fields 'title_embedding,body_embedding' \
|
|
--qdrant.url 'https://your-instance.cloud.qdrant.io:6334' \
|
|
--qdrant.api-key 'your-qdrant-api-key' \
|
|
--qdrant.collection 'your-collection' \
|
|
--migration.create-collection false
|
|
```
|
|
|
|
### All MongoDB-Specific Flags
|
|
|
|
| Flag | Required | Description |
|
|
| :--- | :--- | :--- |
|
|
| `--mongodb.url` | Yes | MongoDB connection string |
|
|
| `--mongodb.database` | Yes | Database name |
|
|
| `--mongodb.collection` | Yes | Collection name |
|
|
| `--mongodb.vector-fields` | Yes | Comma-separated list of vector field names |
|
|
|
|
### Qdrant-Side Options
|
|
|
|
| Flag | Default | Description |
|
|
| :--- | :--- | :--- |
|
|
| `--qdrant.id-field` | `__id__` | Payload field name for original MongoDB `_id` values |
|
|
|
|
## Gotchas
|
|
|
|
- **Vector field names are required:** MongoDB has no schema-level marker for vector fields. You must explicitly list them via `--mongodb.vector-fields`.
|
|
- **ID mapping:** MongoDB `_id` values (ObjectID or string) are converted to Qdrant UUIDs. The original value is stored in payload under `--qdrant.id-field`.
|
|
|
|
## Next Steps
|
|
|
|
After migration, verify your data arrived correctly with the [Migration Verification Guide](/documentation/migration-guidance/).
|