Adding a null-valued attribute to searchableAttributes changes _rankingScore in hybrid search

Author: Ricardo-Quintana-InfoguiaCreated Aug 17, 2026Updated Aug 31, 2026

In hybrid search mode, adding a second attribute to searchableAttributes changes which ranking path (words/keyword vs vectorSort/semantic) "wins" the RRF fusion for a given document — even when that second attribute is null on every affected document and produces no textual match at all.

This causes the _rankingScore for the same document, same query, same semanticRatio, to jump significantly (in our case from ~0.837 to ~0.917) simply because a second searchable attribute exists in the index settings, with no actual match occurring on it.

To Reproduce

Steps to reproduce the behavior:

Create an index with a document such as: json

{
  "id": 329329483434,
  "name": "Plomeros Flash",
  "alternatename": null,
  "descripcionempresa": "Empresa dedicada a prestar servicios de plomería...",
}

Configure settings with a userProvided embedder and hybrid search enabled: json

{
  "searchableAttributes": ["name"],
  "embedders": {
    "semantic": { "source": "userProvided", "dimensions": 3072 }
  }
}

Run a hybrid search: json

{
  "q": "plomeros",
  "hybrid": { "embedder": "semantic", "semanticRatio": 0.5 },
  "vector": [embed plomeros.txt](https://github.com/user-attachments/files/31153631/embed.plomeros.txt),
  "showRankingScore": true,
  "showRankingScoreDetails": true
}

Result: _rankingScore: 0.837641716003418, resolved via vectorSort (_rankingScoreDetails.vectorSort.similarity).

Update settings to add a second searchable attribute (still null on this document): json

{
  "searchableAttributes": ["name", "alternatename"]
}

Re-run the exact same search query (same q, same vector, same semanticRatio).

Result: _rankingScore: 0.9166666666666666, now resolved via words (_rankingScoreDetails.words.score: 1.0), even though alternatename is null on this document and contributes no match whatsoever.

Expected behavior

Adding a searchable attribute that is null/empty on a given document should not change the _rankingScore or the winning ranking path (keyword vs semantic) for that document, since no additional match information exists. The RRF fusion outcome appears to shift based on the global keyword-search result set changing (other documents becoming newly matchable via the added attribute), which indirectly re-ranks documents that had no match on that attribute at all.

Impact

This makes _rankingScore unstable/unpredictable across otherwise-identical index configurations, which breaks downstream logic that relies on score thresholds (e.g., search-intent classification based on _rankingScore and _rankingScoreDetails) purely because a searchable field was added, independent of whether it had any actual bearing on the specific document's relevance.

Meilisearch version: 1.52

Additional context

proximityPrecision: byWord rankingRules: default order (words, typo, attributeRank, proximity, exactness, sort) Reproduced consistently across repeated identical requests.