aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/querytransform
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-03-29 12:25:00 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2023-03-29 12:34:00 +0200
commit656e755c584897d298fcf95bea5376f1fb1c13f5 (patch)
treea7f7423e01ae62a46c33abbcb6f658d8ef16014c /container-search/src/main/java/com/yahoo/search/querytransform
parent7ac642eefd2be2b52aa0878ad8d926521fe00a20 (diff)
Use CompoundName.from in tests and construction of static objects.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/querytransform')
-rw-r--r--container-search/src/main/java/com/yahoo/search/querytransform/BooleanSearcher.java6
-rw-r--r--container-search/src/main/java/com/yahoo/search/querytransform/SortingDegrader.java4
-rw-r--r--container-search/src/main/java/com/yahoo/search/querytransform/WandSearcher.java12
-rw-r--r--container-search/src/main/java/com/yahoo/search/querytransform/WeakAndReplacementSearcher.java4
4 files changed, 13 insertions, 13 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/querytransform/BooleanSearcher.java b/container-search/src/main/java/com/yahoo/search/querytransform/BooleanSearcher.java
index f43be20e0ac..91315fe1bb3 100644
--- a/container-search/src/main/java/com/yahoo/search/querytransform/BooleanSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/querytransform/BooleanSearcher.java
@@ -28,9 +28,9 @@ import static com.yahoo.yolean.Exceptions.toMessageString;
@Provides(BooleanSearcher.PREDICATE)
public class BooleanSearcher extends Searcher {
- private static final CompoundName FIELD = new CompoundName("boolean.field");
- private static final CompoundName ATTRIBUTES = new CompoundName("boolean.attributes");
- private static final CompoundName RANGE_ATTRIBUTES = new CompoundName("boolean.rangeAttributes");
+ private static final CompoundName FIELD = CompoundName.from("boolean.field");
+ private static final CompoundName ATTRIBUTES = CompoundName.from("boolean.attributes");
+ private static final CompoundName RANGE_ATTRIBUTES = CompoundName.from("boolean.rangeAttributes");
public static final String PREDICATE = "predicate";
@Override
diff --git a/container-search/src/main/java/com/yahoo/search/querytransform/SortingDegrader.java b/container-search/src/main/java/com/yahoo/search/querytransform/SortingDegrader.java
index 75b06c29193..81881685a1d 100644
--- a/container-search/src/main/java/com/yahoo/search/querytransform/SortingDegrader.java
+++ b/container-search/src/main/java/com/yahoo/search/querytransform/SortingDegrader.java
@@ -41,9 +41,9 @@ public class SortingDegrader extends Searcher {
/** Set this to false in query.properties to turn off degrading. Default: on */
// (this is not called ranking.sorting.degrading because it should not be part of the query object model
- public static final CompoundName DEGRADING = new CompoundName("sorting.degrading");
+ public static final CompoundName DEGRADING = CompoundName.from("sorting.degrading");
- public static final CompoundName PAGINATION = new CompoundName("to_be_removed_pagination");
+ public static final CompoundName PAGINATION = CompoundName.from("to_be_removed_pagination");
@Override
public Result search(Query query, Execution execution) {
diff --git a/container-search/src/main/java/com/yahoo/search/querytransform/WandSearcher.java b/container-search/src/main/java/com/yahoo/search/querytransform/WandSearcher.java
index 89245eaf137..bfac668b6c4 100644
--- a/container-search/src/main/java/com/yahoo/search/querytransform/WandSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/querytransform/WandSearcher.java
@@ -63,12 +63,12 @@ public class WandSearcher extends Searcher {
*/
private static class InputResolver {
- private static final CompoundName WAND_FIELD = new CompoundName("wand.field");
- private static final CompoundName WAND_TOKENS = new CompoundName("wand.tokens");
- private static final CompoundName WAND_HEAP_SIZE = new CompoundName("wand.heapSize");
- private static final CompoundName WAND_TYPE = new CompoundName("wand.type");
- private static final CompoundName WAND_SCORE_THRESHOLD = new CompoundName("wand.scoreThreshold");
- private static final CompoundName WAND_THRESHOLD_BOOST_FACTOR = new CompoundName("wand.thresholdBoostFactor");
+ private static final CompoundName WAND_FIELD = CompoundName.from("wand.field");
+ private static final CompoundName WAND_TOKENS = CompoundName.from("wand.tokens");
+ private static final CompoundName WAND_HEAP_SIZE = CompoundName.from("wand.heapSize");
+ private static final CompoundName WAND_TYPE = CompoundName.from("wand.type");
+ private static final CompoundName WAND_SCORE_THRESHOLD = CompoundName.from("wand.scoreThreshold");
+ private static final CompoundName WAND_THRESHOLD_BOOST_FACTOR = CompoundName.from("wand.thresholdBoostFactor");
private final String fieldName;
private final WandType wandType;
private final Map<Object, Integer> tokens;
diff --git a/container-search/src/main/java/com/yahoo/search/querytransform/WeakAndReplacementSearcher.java b/container-search/src/main/java/com/yahoo/search/querytransform/WeakAndReplacementSearcher.java
index 2d6e059342e..9aa7a9d998d 100644
--- a/container-search/src/main/java/com/yahoo/search/querytransform/WeakAndReplacementSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/querytransform/WeakAndReplacementSearcher.java
@@ -21,8 +21,8 @@ import com.yahoo.yolean.chain.After;
*/
@After(MinimalQueryInserter.EXTERNAL_YQL)
public class WeakAndReplacementSearcher extends Searcher {
- static final CompoundName WEAKAND_REPLACE = new CompoundName("weakAnd.replace");
- static final CompoundName WAND_HITS = new CompoundName("wand.hits");
+ static final CompoundName WEAKAND_REPLACE = CompoundName.from("weakAnd.replace");
+ static final CompoundName WAND_HITS = CompoundName.from("wand.hits");
@Override public Result search(Query query, Execution execution) {
if (!query.properties().getBoolean(WEAKAND_REPLACE)) {