Apache Lucene open-source search software
LUCENE-2304: FuzzyLikeThisQuery should set MaxNonCompetitiveBoost for faster speed
Robert Muir668ef95427ca
diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java b/lucene/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.javaindex 989a4c58b9e..9b0f72b3439 100644--- a/lucene/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java+++ b/lucene/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java@@ -217,6 +217,7 @@ public class FuzzyLikeThisQuery extends QueryvariantsQ.insertWithOverflow(st);minScore = variantsQ.top().score; // maintain minScore}+ boostAtt.setMaxNonCompetitiveBoost(variantsQ.size() >= MAX_VARIANTS_PER_TERM ? minScore : Float.NEGATIVE_INFINITY);}}