Tune Qdrant collection HNSW graph parameters and enable on-disk payload indexing for large collections

domain: qdrant.tech/documentation · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. At collection creation set hnsw_config.m (number of bidirectional links per node, default 16) and hnsw_config.ef_construct (candidate list size during build, default 100) in the vectors config
  2. Higher m (e.g. 32–64) improves recall at the cost of more memory and slower indexing; higher ef_construct improves index quality at build time but does not affect query speed
  3. Set hnsw_config.on_disk=true to store the HNSW graph on disk rather than RAM for collections larger than available memory — expect higher query latency
  4. Enable on-disk payload storage by setting payload_storage_type='on_disk' at collection creation to avoid RAM exhaustion for large metadata payloads
  5. Create payload indexes for filtered searches: POST /collections/{name}/index with field_name and field_schema (e.g. 'integer', 'keyword') so Qdrant can prune candidates before vector comparison
  6. Tune ef (search-time candidate list size) per query via params.hnsw_ef in the search request — higher values improve recall at the cost of latency

Known gotchas

Related routes

Tune pgvector HNSW index parameters (m, ef_construction, hnsw.ef_search) for recall and query latency
github.com/pgvector/pgvector · 6 steps · unrated
Build a pgvector HNSW index faster using parallel index builds
github.com/pgvector/pgvector · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans