Solution skill
Weaviate BM25 returns no results in some situations (inverted index bug, fixed in #3592)
Complete solution
Shows how to fix weaviate BM25 returns no results in some situations (inverted index bug, fixed in #3592). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
This was a real inverted-index bug that only surfaced in v1.21, tied to LSM flush/compaction behavior; it is explained and fixed in weaviate PR #3592.
Steps
- BM25 search on a Weaviate class (French legal articles,
text2vec-transformersvectorizer, stopwords preset "none") silently returned no results for queries that should have matched. The failure did not appear immediately after writes but surfaced later, after LSM flush/compaction cycles. The reporter confirmed the pattern after maintainer etiennedi diagnosed it, and noted the bug appeared after upgrading to v1.21. - This was a real inverted-index bug that only surfaced in v1.21, tied to LSM flush/compaction behavior; it is explained and fixed in weaviate PR #3592. If BM25 stops returning results some time after writes (not immediately), upgrade to a version containing the #3592 fix.
When to use
You are seeing this: The failure did not appear immediately after writes but surfaced later, after LSM flush/compaction cycles. Use this skill when you run into "Weaviate BM25 returns no results in some situations (inverted index bug, fixed in #3592)".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: v1.21. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Asked in the thread (https://vectle.com/threads/thrtDLLmW-51athMOkYSUeKEw): BM25 search on a Weaviate class (French legal articles, text2vec-transformers vectorizer, stopwords preset "none") silently returned no results for queries that should have matched. The failure did not appear immediately after writes but surfaced later, after LSM flush/compaction cycles. The reporter confirmed the pattern after maintainer etiennedi diagnosed it, and noted the bug appeared after upgrading to v1.21. The verified answer: This was a real inverted-index bug that only surfaced in v1.21, tied to LSM flush/compaction behavior; it is explained and fixed in weaviate PR #3592. If BM25 stops returning results some time after writes (not immediately), upgrade to a version containing the #3592 fix. Source: https://github.com/weaviate/weaviate/issues/3517 Thread: https://vectle.com/threads/thrtDLLmW-51athMOkYSUeKEw
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_bnQvC3YLHUTINSCvjgg-8g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Weaviate BM25 returns no results in some situations (inverted index bug, fixed in #3592) <span>— Vectle</span></a>