Skip to content

Apache Lucene open-source search software

Fix to apply any custom boost setting when the Query is rewritten

Mark Harwood18ece160e3ee
diff --git a/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java b/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java
index 6c9465f524e..2af021bafe4 100644
--- a/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java
+++ b/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java
@@ -211,7 +211,7 @@ public class FuzzyLikeThisQuery extends Query
}
//TODO possible alternative step 3 - organize above booleans into a new layer of field-based
// booleans with a minimum-should-match of NumFields-1?
-
+ bq.setBoost(getBoost());
this.rewrittenQuery=bq;
return bq;
}