diff options
author | Arne Juul <arnej@verizonmedia.com> | 2020-07-07 08:51:21 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2020-07-09 09:55:22 +0000 |
commit | 88099bec32481b83b41f3966c2a88ebf4034f1fe (patch) | |
tree | bd703eae788918a6430dd5973af70ce84e40f7a4 /container-search | |
parent | 1d12f4b4b92771dfe7e245b88ce89adc911c509e (diff) |
clean up various issues with ParseItem class
* SimpleQueryStack only used for one unit test, move it there
* Actual instances of ParseItem also only used for same unit test.
Split out the object representation into a separate
SimpleQueryStackItem class in the unit test directory.
* give location ITEM_LOCATION_TERM instead of overloading NUMTERM
* ParseItem::ITEM_PAREN never used for anything, remove it
* add comment for removal of PAREN enum in prelude/query/Item.java
* refactor flag handling with one method per flag
Diffstat (limited to 'container-search')
-rw-r--r-- | container-search/src/main/java/com/yahoo/prelude/query/Item.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/query/Item.java b/container-search/src/main/java/com/yahoo/prelude/query/Item.java index 475a80f7ae0..bd368864e9a 100644 --- a/container-search/src/main/java/com/yahoo/prelude/query/Item.java +++ b/container-search/src/main/java/com/yahoo/prelude/query/Item.java @@ -42,7 +42,7 @@ public abstract class Item implements Cloneable { WORD(4), INT(5), PHRASE(6), - PAREN(7), + PAREN(7), // TODO not used - remove on Vespa 8 PREFIX(8), SUBSTRING(9), NEAR(11), @@ -60,7 +60,8 @@ public abstract class Item implements Cloneable { PREDICATE_QUERY(23), REGEXP(24), WORD_ALTERNATIVES(25), - NEAREST_NEIGHBOR(26); + NEAREST_NEIGHBOR(26), + LOCATION_TERM(27); public final int code; |