Per-tenant BM25 statistics in Qdrant

Per-tenant BM25 statistics in Qdrant let tenants with different vocabularies share one collection without common terms in one tenant skewing keyword relevance for another. This page covers the options, setup, security and limits to confirm before you build.

On this page

Per-tenant BM25 statistics in Qdrant for shared keyword relevance

A platform team serving many tenants from one Qdrant collection can keep keyword relevance fair by giving each tenant its own term statistics for BM25, which Qdrant 1.19 supports as per-tenant IDF. The problem arises because BM25 scores a term by how rare it is across the corpus. Inverse document frequency (IDF) is the measure of that rarity: a word that appears in few documents gets a high weight, and a word that appears everywhere gets a low one. When every tenant shares one collection and one global vocabulary, the statistics come from the mixed corpus. A term that is common among one tenant's documents, such as a product code or a clinical phrase, may look rare globally and be over-weighted for that tenant, while a term that is ordinary in another language may be under-weighted. The result is ranking that reflects the blended corpus rather than each tenant's own content.

Teams need per-tenant statistics when tenants differ sharply in vocabulary, language or domain, and when keyword ranking is a visible part of what each customer receives. Shared collections that serve several languages or industries are the clearest cases. Miniaturized sparse approaches such as miniCOIL are an alternative to classic BM25 weighting for sparse search in shared collections, and the choice between them should follow from your test results rather than from a general preference. Before you commit, confirm the exact mechanics, the required collection configuration, how tenant identifiers map to statistics, and whether the feature interacts with the payload partitioning and tenant filters you already enforce, against the Qdrant 1.19 release notes and the Qdrant documentation for the version you run. The supplied material does not describe these details, so treat them as open questions for a proof of concept on a sample of your own tenants.

How a tenant keyword query travels through a shared collection

The request starts at the client with a tenant identity, which the API layer turns into a mandatory tenant filter before anything reaches Qdrant. The shared collection then scores only that tenant's points, using the tenant's own BM25 statistics applied at scoring time. Check that the API layer is the only path to the collection, that the tenant field is indexed as a keyword filter, and that the database credentials cannot be used to query other tenants' data.

Illustrative design of a keyword query path, not a confirmed internal Qdrant architecture.

Which keyword scoring option fits your tenant mix

This table compares four ways to keep keyword relevance fair when tenants use different vocabularies: a global BM25 vocabulary, per-tenant IDF on a shared collection, miniCOIL sparse vectors and a collection per tenant. Read each row for what the option fixes, what it costs to run and which tenant mix it suits. The main takeaway is that shared collections keep operations simpler, while stronger isolation raises overhead.

OptionWhat it fixesCost in operations and memoryBest-fit tenant mix and what to confirm
Global BM25 vocabulary in a shared collectionOne set of term weights for all tenants, with the simplest setup.Lowest overhead. Rare terms in one tenant can skew scores for others.Tenants with similar vocabularies. Confirm how IDF is computed across the collection in the BM25 docs.
Per-tenant IDF on a shared collection (Qdrant 1.19)Scores each tenant's terms against that tenant's own statistics, inside one collection.Requires a version check against 1.19 and a clear tenant identifier in payloads.Many tenants with distinct vocabularies. Confirm the setting, tenant key rules and reindex needs.
miniCOIL sparse vectorsLearned term weights that also reflect meaning and context.Extra embedding step at ingestion and query time, plus model management and compute.Domain-specific vocabularies on a shared model. Confirm model license, languages and whether weights vary by tenant.
Collection per tenantSeparate term statistics and data for each tenant, with clean per-tenant deletion.Highest overhead. Each collection adds shard and memory cost, so check sizing guidance.Few tenants with strict isolation needs. Confirm per-collection memory with your vector and index settings.
Default starting pointA balance of fairness and operational simplicity for one shared collection.Moderate overhead, plus validation that the feature behaves as documented in your version.Shared collections with distinct vocabularies. Test relevance per tenant before production traffic.

How shared IDF skews ranking for smaller tenants

A shared IDF skews ranking because the inverse document frequency that BM25 uses is computed from whatever corpus it sees. When every tenant's documents sit in one collection, a term's rarity is measured across the pooled corpus, and the largest tenant sets most of those numbers. A word that is ordinary inside a small tenant can look rare in the pool, which inflates its weight and lifts generic words from that tenant in results. Illustrative example, with invented counts: a small tenant has 2,000 documents, and 1,000 of them contain the word "ticket". Inside that tenant the IDF is about 0.7 (natural log). In a pool of 902,000 documents where only 6,000 contain "ticket", the pooled IDF is about 5.0, so an everyday word from the small tenant carries roughly seven times the weight it has inside its own corpus.

The reverse happens to a small tenant's distinctive terms. A word that a large tenant uses widely, such as a product line or a common clinical or legal phrase, has a low pooled IDF, so it contributes little when the small tenant searches for it, even though it is the term that best identifies its documents. Illustrative example, with invented counts: 40 of the small tenant's 2,000 documents contain "reconciliation", an IDF of about 3.9 inside the tenant. The large tenant has 180,000 documents with the word, so the pooled IDF falls to about 1.6. The most specific query term loses more than half its weight, and documents that mention only general terms can outrank the ones that matter to that tenant's users.

The effect is strongest where tenants use domain jargon, different languages or product names, because their vocabularies overlap least and the large tenant's words dominate the pooled counts. Measure it on each tenant's own queries before choosing an option. Collect a sample of actual queries per tenant, mark which documents are relevant, and compare where those documents rank under pooled statistics, under per-tenant IDF and under miniCOIL sparse search. Confirm in the Qdrant 1.19 documentation how per-tenant IDF is enabled, how it affects indexing, and how many documents a tenant needs before its statistics are meaningful. Then check whether the chosen option changes results for tenants already in production.

Choosing per-tenant statistics by tenant situation

Tenants in the same industry often share a general language but use different terms for the same things, such as clinical shorthand in one account and billing jargon in another. When IDF statistics are computed across the whole collection, a term common in one tenant's documents can look rare overall and carry more weight than it deserves in another tenant's searches. Per-tenant IDF is the direction to test first, because it weights each tenant's keywords against that tenant's own corpus.

  • Signal to watch: a tenant's exact-term queries return documents that match a rare-looking word but miss the obvious matches.
  • Signal to watch: relevance complaints cluster in tenants whose vocabulary differs most from the largest tenant.
  • Test: build a labeled query set for each tenant and compare rankings under shared and per-tenant statistics.
  • Test: confirm how the per-tenant setting applies to new and existing collections in your version.

Check that relevance changes move in the expected direction for each tenant before you change a production collection.

Setting up per-tenant BM25 in a shared Qdrant collection

This sequence takes a shared Qdrant collection from version confirmation to a tested tenant boundary, so each tenant's keyword scores reflect its own vocabulary and no query returns another tenant's points.

  1. Confirm the target Qdrant version

    Check which Qdrant release your cluster runs and read the 1.19 release notes on the GitHub releases page before you design anything. The per-tenant IDF feature and the miniCOIL sparse option are tied to that release line, so confirm they are present in your version and note any limits the notes describe. Record the exact version in your design document. Done when the team can point to the release notes section that covers per-tenant IDF and to the version string running in each environment.

  2. Choose the scoring option

    Decide between BM25 with per-tenant IDF statistics and miniCOIL sparse search, based on how much your tenants' vocabularies differ and how much index change you can accept. Compare both options against the release notes and the sparse vector documentation, and confirm which one your version supports for the collection type you plan to use. Write down the choice, the reason, and what you will measure to justify it. Done when the decision record names one option and lists the trade-offs your reviewers accepted.

  3. Define the tenant field and its index

    Add a tenant identifier to every point's payload and create a keyword payload index on that field, marked as a tenant index as the payload partitioning documentation describes. Confirm the exact index parameters in the Qdrant filtering and indexing docs for your version rather than copying them from older examples. Your team owns the tenant identifier format and its mapping to customer records. Done when a test collection accepts points with the field and a filtered query on one tenant value returns only matching points.

  4. Configure sparse vectors and BM25 settings

    Create the collection with a sparse vector configuration and the BM25 or per-tenant statistics settings for your chosen option, following the sparse vector and IDF documentation for your release. Check the field names, modifiers and tokenizer options in the docs, since they change between releases. Keep the settings in version-controlled configuration. Done when the collection info endpoint shows the sparse vector definition and the modifier you intended, and a small upsert succeeds.

  5. Load a representative sample for each tenant

    Load a sample of documents for every tenant in the collection, including small tenants with niche vocabulary, so the statistics reflect each tenant's terms. Store the sample IDs and tenant assignments in a manifest your team can audit. Ask the data owner for permission to use the sample and confirm your data handling rules apply to the test environment. Done when the manifest shows each tenant's document count and a spot check confirms the expected terms are indexed for each tenant.

  6. Compare relevance against a baseline

    Run a fixed set of queries per tenant against the new collection and against a baseline, such as a shared-statistics index or a previous keyword setup. Have domain reviewers judge the top results and record the scores side by side. Track the results in a table tied to query IDs so changes can be reproduced. Done when the team can show, for each tenant, which queries improved, which did not change, and which regressed, with reviewer sign-off.

  7. Enforce the tenant filter in the API layer

    Make your application or gateway attach the tenant filter to every search, recommendation and retrieval call, and reject requests that lack an authenticated tenant context. Pair this with per-collection access rules in Qdrant where your deployment supports them, following the security documentation. Document which service owns the filter and how it is reviewed. Done when a request with a forged or missing tenant value is rejected before it reaches Qdrant, and the code path has a test.

  8. Test that tenants cannot see each other's points

    Run an isolation test suite that issues queries as tenant A using terms that appear only in tenant B's documents, and confirm no tenant B point is returned, including through scores, counts and facets. Repeat after every configuration change and after any reindexing. Keep the test results as evidence for your security review. Done when the suite passes on the target version with zero cross-tenant results and the output is stored with the release record.

Security and operations for tenant-aware keyword search

Per-tenant IDF changes how keyword scores are computed, so the controls around the collection matter as much as the scoring. The cards below cover where tenant isolation must live, what a self-deployed instance needs before it is exposed, and how audit, deletion and snapshot restores interact with shared statistics.

JWT cannot isolate tenants inside a collection

Qdrant JWT access controls work per collection, so every tenant in a shared collection shares the same read permission. Tenant boundaries inside that collection depend on the tenant_id filter your API layer adds to each query and upsert. Make the API layer the only path to Qdrant, and test that a request with a forged or missing tenant filter returns nothing from another tenant's documents. Confirm that per-tenant IDF statistics are never returned to callers in a form that reveals another tenant's vocabulary.

Qdrant security docs

Enable keys and TLS before exposure

A self-deployed Qdrant instance listens on all network interfaces and has no authentication configured by default. Before any tenant traffic reaches the cluster, set an admin API key and a read-only key, enable TLS for REST and gRPC, and restrict the listening interface and network path to the services that need it. Verify each setting from outside the cluster, because an open port with no key is the most common way a shared index is exposed.

Qdrant security docs

Audit tenant access from operation logs

JSON audit logging of authenticated API operations gives your security team a record for tenant access reviews. Turn it on in the cluster configuration, send the logs to your existing retention and SIEM pipeline, and confirm that entries identify the key or token used for each operation. Review whether logs capture the tenant filter values or only the collection name, since a collection-level log cannot show which tenant a search touched. Agree on who may read these logs, because they can contain tenant identifiers.

Qdrant security docs

Check statistics after tenant deletion

Deleting a tenant by filter removes that tenant's points, but it may not reset the collection-level statistics that BM25 uses for IDF. Ask Qdrant and test in a staging collection whether document frequencies update after a filtered delete, and how long any update takes. Record the expected score shift for remaining tenants, and add a post-deletion check that compares a known query before and after the delete. Include the procedure in your tenant offboarding runbook.

Match snapshot versions to the target cluster

Collection snapshots are tar archives of a collection on one node, and they restore only to clusters on the same minor version or the next minor version. Moving tenant data and its keyword statistics between clusters therefore needs a version check before the snapshot is taken, not after it fails. Plan upgrades so the source and target sit within that window, store snapshots in S3-compatible storage if your policy allows it, and run a search test per tenant after each restore to confirm that scores match the source cluster.

Qdrant snapshots docs

Keep the data path in your infrastructure

A self-hosted Qdrant deployment keeps vectors, payloads and keyword statistics on storage you control. Qdrant needs block-level storage with a POSIX-compatible file system, so it cannot run on NFS or object storage, and SSD or NVMe drives are recommended. Confirm with your platform team that the nodes, backups and logs all stay inside approved regions and accounts, and document the data flow for your compliance reviewers. Hybrid Cloud and Private Cloud options keep managed clusters on your infrastructure, but confirm those terms with Qdrant before choosing them.

Qdrant installation docs

Questions teams ask before changing BM25 scoring

Does Qdrant 1.19 per-tenant IDF replace the need for separate collections?

Not in every case. Per-tenant IDF addresses one problem: a term that is rare for one tenant but common for another gets scored unfairly in a shared collection. It does not change who can read which points, so tenant isolation still depends on the payload filter your API layer applies and, where needed, on per-collection JWT access. Separate collections remain justified when you need hard isolation, separate encryption or deletion boundaries, or different index settings per customer. Confirm the exact behavior, supported sparse configuration and limits in the Qdrant release notes before you design around the feature, and test it with your own tenants' data.

What drives the cost of a per-tenant BM25 rollout?

Most of the cost is engineering time and compute for reindexing, and it moves with four drivers:

  • Tenant count and how unevenly vocabulary is spread across tenants, which sets how many groups you must verify.
  • Data volume per collection, since changing how sparse vectors are scored means reprocessing existing points.
  • Testing against sample queries from each tenant, which is the step teams most often underbudget.
  • API layer changes, such as passing tenant context into every search and keeping the tenant filter enforced.

Who pays depends on the model: your staff for internal work, or a partner under a written scope. Ask for one-time items (design, reindex, testing) separated from recurring ones (upgrades, monitoring, retesting).

How long does a pilot take and what must the team supply?

The length depends on the inputs, so no duration applies without a written scope. A pilot is usually bounded by a small set of tenants with different vocabularies and a fixed set of queries, and the timeline is agreed before work starts. Your team should supply a document sample for each pilot tenant, the queries each tenant actually sends, a staging cluster that matches production topology, the current search code path in your API layer, and a named owner who can approve the ranking results. Confirm the Qdrant version you plan to run, since the feature is tied to the 1.19 release line. Also confirm your storage meets the Qdrant installation docs rules: block storage, no NFS or S3.

Can an in-house team change BM25 scoring without a partner?

Yes, if the team already runs Qdrant in production and has someone who owns search relevance. Much of the work is configuration, reindexing and testing, which a platform team can usually carry out. The harder part is judging relevance. Teams without that experience often ship a change that improves one tenant and quietly degrades another. An in-house checklist covers five steps: confirm the feature and its limits in the release notes, build a per-tenant evaluation set from logged queries, compare rankings before and after for each tenant, plan the reindex window with a rollback path, and add the change to your upgrade runbook. DeployOpen can plan and implement this under a fixed written scope, and its security testing team can review the tenant boundary separately.

What should we ask a partner for in a fixed-scope quote?

Ask for a quote where every line maps to a deliverable you can check. Request these items in writing:

  • The tenants and collections covered, with the pilot count and the production count stated separately.
  • The Qdrant version and sparse configuration targeted, and how later releases will be handled.
  • The reindex plan: which collections are affected, the expected read impact or downtime, and the rollback path.
  • The evaluation method: which query sets are used, who signs off, and what counts as a pass.
  • The API layer changes, including how the tenant filter is enforced and tested.
  • Excluded items, such as ongoing retesting, monitoring or support, and whether those are offered as a retainer.

Ask which costs are one-time and which recur. DeployOpen does not publish a price list, so the quote follows from the written scope.

Does fairer scoring change who can see whose data?

No. Scoring fairness and access control are separate controls. Per-tenant statistics decide how relevant a match is, not whether a caller is allowed to receive a point. Tenant boundaries inside a shared collection still depend on a payload filter applied by your API layer, because Qdrant JWT access is granted per collection and cannot separate tenants inside one shared collection. Review the access and audit logging settings in the Qdrant security docs, confirm the API layer cannot send an unfiltered query, and test that one tenant's token cannot surface another tenant's points through sparse search. Scoring changes can also shift which documents appear in results, so include leakage tests in your sign-off.

Limits to confirm in your Qdrant version and environment

Per-tenant keyword relevance depends on settings, model licensing, storage behavior and tooling that change between Qdrant releases and deployments. The cards below list what to confirm in the Qdrant documentation, the release notes and your own load tests before you commit a design to production.

Exact 1.19 per-tenant IDF behavior

Confirm how per-tenant IDF for BM25 is enabled in the 1.19 release, which config keys control it, and whether it applies to every tenant in a collection or only to a subset you select. Check what happens to tenants that have very few documents, since their term statistics will be thin and their rankings may shift. Run a relevance test with two tenants that use different vocabularies before you assume the behavior fits your data.

Latest release
v1.19.2
Qdrant releases

miniCOIL licensing and language coverage

Confirm the license terms of the miniCOIL model you plan to use, including whether your commercial use and redistribution inside your product are allowed. Check which languages and domains the model was trained to handle, because a vocabulary gap in your largest tenant will show up as weak keyword recall. Test your own multilingual content and tenant-specific terms before you choose the model.

Memory and disk cost of sparse vectors

Sparse vectors add index and storage cost that grows with the number of tenants, documents and distinct terms. Measure RAM and disk on a copy of your data with the tenant count you expect in year one, and repeat the test at your projected peak. Storage must sit on block-level POSIX storage (such as SSD or NVMe) and cannot use network file systems or object storage, so confirm your volumes meet that rule before you size the nodes.

Installation docs

Incremental writes and statistic refresh

Confirm whether per-tenant term statistics update as documents are inserted, updated or deleted, or whether a periodic rebuild is needed to keep scores accurate. A rebuild can create a window where relevance drifts, and a large tenant may take longer to rebuild than a small one. Write a test that adds and removes documents under load, then compares scores before and after to see how quickly the statistics catch up.

Client SDK support

Confirm that the client SDK you use exposes the sparse vector fields, the BM25 configuration and the per-tenant options needed for this design. A client that lacks a field may force you to send raw requests, which adds maintenance risk on every upgrade. Pin the SDK version in your build, and run your indexing and query code against a test cluster on the same release you run in production.

Snapshot compatibility with cluster versions

Snapshots can be restored only to clusters on the same minor version or the next minor version. Confirm that your backup snapshots taken with the new BM25 statistics restore cleanly to your target version, and test a restore into a staging cluster before you rely on it for recovery. Plan your upgrade order so that a restore path always exists between the version that wrote the snapshot and the version that will read it.

Snapshots docs

How DeployOpen scopes and delivers per-tenant keyword search

DeployOpen starts with a written scope that maps your tenants, vocabularies and keyword queries onto Qdrant's per-tenant BM25 and miniCOIL options. We then build, test and document the collection design in infrastructure you control, so your team can run and review it after handover.

How we scope

  • Inventory which tenants share a collection and how their vocabularies differ across languages, industries or product lines.
  • Confirm the Qdrant version you run, since per-tenant IDF for BM25 is a 1.19 feature and must match your cluster.
  • Agree in writing which keyword fields, tokenizer settings and sparse search paths are in scope before work starts.

How we build

  • Configure the collection schema, tenant field and sparse vector settings, then load representative data from your own tenants.
  • Compare keyword ranking for each tenant against a shared-statistics baseline, using queries your users actually run.
  • Enforce the tenant filter in your API layer alongside JWT collection access, and test that cross-tenant results cannot appear.

How we hand over

  • Deliver the collection configuration, ingestion code and query examples as versioned files in your repository.
  • Provide a test report with the query sets, expected rankings and findings, plus steps to repeat the checks after upgrades.
  • Document the operational runbook for re-indexing, adding tenants and monitoring, so your team can run the setup independently.

How we support

  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before any work begins.
  • Ongoing support, Qdrant upgrades and continuous testing of keyword relevance are available as a retainer.
  • Ask any partner for a quote built from the written scope, including which parts recur after handover and which are one-time.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.