-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Stacked tokens (tokens in the same position) in a match query usually represent alternatives, eg query-time synonym expansion, fuzzy terms, etc
These queries tend to favour the rarer terms, which (esp with fuzzy queries) is likely to be the wrong choice (see #5883 and #3125).
From #8352 (comment)
The BlendedTermQuery should be used whenever two query terms are synonyms of each other and should be treated as 'one thing'. It tries to adjust statistics independently of the scoring function (which may have no concept of IDF) to deal with the problem.
But I think for it to work, it would need per-term boost support? Then we need a rewrite method that can build this instead of BooleanQuery, it would look a lot like the boolean one: https://github.com/apache/lucene-solr/blob/trunk/lucene/core/src/java/org/apache/lucene/search/MultiTermQuery.java#L140
Per-term boost support is required to be able to take the fuzzy edit distance into account.