Skip to content

fix: Return empty results when BM25 keyword index is empty - #73

Open
VedantMadane wants to merge 1 commit into
codepath:mainfrom
VedantMadane:fix/issue-68
Open

fix: Return empty results when BM25 keyword index is empty#73
VedantMadane wants to merge 1 commit into
codepath:mainfrom
VedantMadane:fix/issue-68

Conversation

@VedantMadane

Copy link
Copy Markdown

Summary

Return empty results when BM25 keyword index is empty

Changes

Fixes #68

- Skip BM25Okapi([]) construction which ZeroDivisionErrors in IDF
- search() already returned [] for empty chunks; index() now matches
- Remove xfail on test_empty_index (issue codepath#68 / H-01)

Fixes codepath#68

Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyword search raises ZeroDivisionError when the index is empty

1 participant