You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix MoreLikeThis panic on indexes with deleted documents
create_score_term used the alive-only document count (num_docs) as the
idf denominator, while the term doc_freq it reads from the term
dictionary still counts soft-deleted documents until a merge expunges
them. After deletions this could make doc_freq > num_docs, tripping the
`doc_count >= doc_freq` assertion in idf() and panicking the search
thread.
Use max_doc (which includes deleted documents) instead, matching how the
standard BM25 scorer computes total_num_docs. Add a regression test that
deletes documents and runs a MoreLikeThis query.
0 commit comments