quickwit-oss / tantivy

Tantivy is a full-text search engine library inspired by Apache Lucene and written in Rust
MIT License
11.91k stars 666 forks source link

feat(query): Make `BooleanQuery` supports `minimum_number_should_match` #2405

Closed LebranceBW closed 3 months ago

LebranceBW commented 4 months ago

see issue #2398

In this commit, a novel scorer named DisjunctionScorer is introduced, which performs the union of inverted chains with the minimal required elements. BTW, it's implemented via a min-heap. Necessary modifications on BooleanQuery and BooleanWeight are performed as well.

fulmicoton commented 4 months ago

@LebranceBW don't forget to reapply for review once you have added the requested changes

LebranceBW commented 4 months ago

@fulmicoton I've done above requested changes, and BooleanWeight::complex_scorer has some heavy modification, and I'd say it's a bit messy. Could you help me on it?

fulmicoton commented 4 months ago

@PSeitz can you help @LebranceBW and take over the code review?

LebranceBW commented 4 months ago

@PSeitz Could you help take a review for this PR? Thanks a lot.

LebranceBW commented 4 months ago

@PSeitz Sorry to interrupt your work, but I wanna know this PR could be push forward again?

LebranceBW commented 4 months ago

@PSeitz Sorry to interrupt your work, but I wanna know this PR could be push forward again?

PSeitz commented 3 months ago

@PSeitz Sorry to interrupt your work, but I wanna know this PR could be push forward again?

@LebranceBW I left a comment to simplify the code regarding FullIntersection

LebranceBW commented 3 months ago

@PSeitz Sorry to interrupt your work, but I wanna know this PR could be push forward again?

@LebranceBW I left a comment to simplify the code regarding FullIntersection

@PSeitz FullIntersection already removed.

LebranceBW commented 3 months ago

@PSeitz May this PR could be push forward again?

PSeitz commented 3 months ago

Thanks @LebranceBW for the PR!

lnx commented 3 months ago

👍🏻