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
I'm willing to implement this feature. However, my familiarity with this project is limited. Here are my initial considerations:
The minimum_should_match functionality operates as an additional constraint on BooleanQuery. It appears that the existing UnionScorer cannot fit it. A novel scorer MinimumRequirementScorer based on UnionScorer needs to be developed, which rejects Doc missing conditions. minimum_should_match will be passed as one of it's member.
To minimize performance impacts, the MinimumRequirementScorer, UnionScorer, and RequiredOptionalScorer will be employed under different BooleanQuery combinations.
The BooleanQuery -> BooleanWeight -> BooleanScorer are precisely here so that while users define their query by instanting a Query object, this query can be at runtime converted into different Scorer.
…h`. see issue quickwit-oss#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.
In a booleanquery, it can be useful to indicate that we want any 2 out of 3 terms to match.
In lucene, this is possible by setting https://lucene.apache.org/core/6_1_0/core/org/apache/lucene/search/BooleanQuery.Builder.html#setMinimumNumberShouldMatch-int-
Regardless of the implementation, it will need to have no impact over the performance of the existing union queries.
The text was updated successfully, but these errors were encountered: