quantleaf / probly-search

A lightweight full-text search library written in Rust that provides full control over the scoring calculations
MIT License
60 stars 5 forks source link

Clamp document_frequency in bm25 score before_each(). #25

Closed tmpfs closed 4 months ago

tmpfs commented 4 months ago

Closes #24.

marcus-pousette commented 4 months ago

Looks good! hough it would be nice to have a test to make sure this issue does not appear again later :)

marcus-pousette commented 4 months ago

I have no problem merging this how it is, but want you to have the opportunity to add test if you like! @tmpfs

tmpfs commented 4 months ago

Good call @marcus-pousette , I've added a simple test spec which triggers the code path and ensures no panic!

LGTM 🙏

marcus-pousette commented 4 months ago

awesomee!