Migrate from Elasticsearch to Qdrant

What You Need from Elasticsearch

  • Elasticsearch URL — the HTTP endpoint
  • Index name — the index containing your vectors
  • Credentials — username/password or API key

Concept Mapping

ElasticsearchQdrantNotes
IndexCollectionOne-to-one mapping
DocumentPointEach document becomes a point
dense_vector fieldVectorMapped automatically
Document fieldsPayloadNon-vector fields become payload
cosineCosineES returns 1 - cosine_distance; Qdrant returns cosine similarity directly
l2_normEuclidDirect mapping
dot_productDotDirect mapping

Run the Migration

docker run --net=host --rm -it registry.cloud.qdrant.io/library/qdrant-migration elasticsearch \
    --elasticsearch.url 'https://your-es-host:9200' \
    --elasticsearch.index 'your-index' \
    --elasticsearch.username 'elastic' \
    --elasticsearch.password 'your-password' \
    --qdrant.url 'https://your-instance.cloud.qdrant.io:6334' \
    --qdrant.api-key 'your-qdrant-api-key' \
    --qdrant.collection 'your-collection'

Using API Key Authentication

docker run --net=host --rm -it registry.cloud.qdrant.io/library/qdrant-migration elasticsearch \
    --elasticsearch.url 'https://your-es-host:9200' \
    --elasticsearch.index 'your-index' \
    --elasticsearch.api-key 'your-es-api-key' \
    --qdrant.url 'https://your-instance.cloud.qdrant.io:6334' \
    --qdrant.api-key 'your-qdrant-api-key' \
    --qdrant.collection 'your-collection'

All Elasticsearch-Specific Flags

FlagRequiredDescription
--elasticsearch.urlYesElasticsearch HTTP endpoint
--elasticsearch.indexYesIndex to migrate
--elasticsearch.usernameNoUsername for basic auth
--elasticsearch.passwordNoPassword for basic auth
--elasticsearch.api-keyNoAPI key for authentication
--elasticsearch.insecure-skip-verifyNoSkip TLS certificate verification

Qdrant-Side Options

FlagDefaultDescription
--qdrant.id-field__id__Payload field name for original Elasticsearch document IDs

Hybrid Search Considerations

If your Elasticsearch setup uses hybrid BM25 + kNN scoring, you’ll need to reconstruct this in Qdrant using sparse vectors (for BM25-like behavior) alongside dense vectors. The migration tool transfers the dense vectors; you’ll need to generate sparse vectors separately if you want hybrid search in Qdrant.

Qdrant supports native hybrid search with Reciprocal Rank Fusion (RRF) to combine dense and sparse results.

Gotchas

  • Nested documents: Elasticsearch nested documents need to be flattened or restructured for Qdrant’s payload model.
  • Score normalization: Elasticsearch _score values are not comparable to Qdrant scores. Use rank-based metrics (recall@k, Spearman correlation) rather than raw score comparison when verifying your migration.
  • BM25 is not migrated: The migration tool transfers vectors and document fields. If you relied on Elasticsearch’s BM25 scoring, you’ll need to set up sparse vectors in Qdrant separately.

Next Steps

After migration, verify your data arrived correctly with the Migration Verification Guide.

Was this page useful?

Thank you for your feedback! 🙏

We are sorry to hear that. 😔 You can edit this page on GitHub, or create a GitHub issue.