Skip to content

Commit a6432b2

Browse files
OAK-11352 (minor) make useInFullTextQuery final
1 parent 13776de commit a6432b2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyDefinition.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class ElasticPropertyDefinition extends PropertyDefinition {
3838
* Whether to use dynamic boosted values in full text queries, default is true
3939
*/
4040
private static final String PROP_USE_IN_FULL_TEXT_QUERY = "useInFullTextQuery";
41-
private boolean useInFullTextQuery = true;
41+
private final boolean useInFullTextQuery;
4242

4343
public ElasticPropertyDefinition(IndexDefinition.IndexingRule idxDefn, String nodeName, NodeState defn) {
4444
super(idxDefn, nodeName, defn);
@@ -49,9 +49,7 @@ public ElasticPropertyDefinition(IndexDefinition.IndexingRule idxDefn, String no
4949
getOptionalValue(defn, PROP_K, DEFAULT_K),
5050
getOptionalValue(defn, PROP_CANDIDATES, DEFAULT_CANDIDATES));
5151
}
52-
if (this.dynamicBoost) {
53-
this.useInFullTextQuery = getOptionalValue(defn, PROP_USE_IN_FULL_TEXT_QUERY, true);
54-
}
52+
this.useInFullTextQuery = this.dynamicBoost && getOptionalValue(defn, PROP_USE_IN_FULL_TEXT_QUERY, true);
5553
}
5654

5755
public KnnSearchParameters getKnnSearchParameters() {

0 commit comments

Comments
 (0)