summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2022-03-23 13:23:59 +0100
committerGitHub <noreply@github.com>2022-03-23 13:23:59 +0100
commitf74644994ef7520c18e29e2c6496d3f0dd468427 (patch)
treed9c3a7be5ea7d52c05291c47ce31034b5e6db6c3
parentc4860985003377b22ec033636551130a70f97eb5 (diff)
parent1a182ea3227391da68130c3e4d2e5932fdad33ed (diff)
Merge pull request #21771 from vespa-engine/jonmv/multi-range-item
Use 7 inste4ad ofo 30 for MultiTermItem
-rw-r--r--container-search/abi-spec.json2
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/query/Item.java5
-rw-r--r--searchlib/src/vespa/searchlib/parsequery/parse.h4
-rw-r--r--searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp3
4 files changed, 7 insertions, 7 deletions
diff --git a/container-search/abi-spec.json b/container-search/abi-spec.json
index 8ac5aaa127d..73d4b99b382 100644
--- a/container-search/abi-spec.json
+++ b/container-search/abi-spec.json
@@ -720,6 +720,7 @@
"public static final enum com.yahoo.prelude.query.Item$ItemType WORD",
"public static final enum com.yahoo.prelude.query.Item$ItemType INT",
"public static final enum com.yahoo.prelude.query.Item$ItemType PHRASE",
+ "public static final enum com.yahoo.prelude.query.Item$ItemType MULTI_TERM",
"public static final enum com.yahoo.prelude.query.Item$ItemType PREFIX",
"public static final enum com.yahoo.prelude.query.Item$ItemType SUBSTRING",
"public static final enum com.yahoo.prelude.query.Item$ItemType NEAR",
@@ -741,7 +742,6 @@
"public static final enum com.yahoo.prelude.query.Item$ItemType GEO_LOCATION_TERM",
"public static final enum com.yahoo.prelude.query.Item$ItemType TRUE",
"public static final enum com.yahoo.prelude.query.Item$ItemType FALSE",
- "public static final enum com.yahoo.prelude.query.Item$ItemType MULTI_TERM",
"public final int code"
]
},
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 06fe07d3895..5ad0542c139 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
@@ -38,7 +38,7 @@ public abstract class Item implements Cloneable {
WORD(4),
INT(5),
PHRASE(6),
- // 7 was PAREN, unused in Vespa 7
+ MULTI_TERM(7),
PREFIX(8),
SUBSTRING(9),
NEAR(11),
@@ -59,8 +59,7 @@ public abstract class Item implements Cloneable {
NEAREST_NEIGHBOR(26),
GEO_LOCATION_TERM(27),
TRUE(28),
- FALSE(29),
- MULTI_TERM(30);
+ FALSE(29);
public final int code;
diff --git a/searchlib/src/vespa/searchlib/parsequery/parse.h b/searchlib/src/vespa/searchlib/parsequery/parse.h
index c9b7940b887..34ea692c370 100644
--- a/searchlib/src/vespa/searchlib/parsequery/parse.h
+++ b/searchlib/src/vespa/searchlib/parsequery/parse.h
@@ -33,7 +33,7 @@ public:
ITEM_TERM = 4,
ITEM_NUMTERM = 5,
ITEM_PHRASE = 6,
- /* removed: ITEM_PAREN = 7, */
+ ITEM_MULTI_TERM = 7,
ITEM_PREFIXTERM = 8,
ITEM_SUBSTRINGTERM = 9,
ITEM_ANY = 10,
@@ -56,7 +56,7 @@ public:
ITEM_GEO_LOCATION_TERM = 27,
ITEM_TRUE = 28,
ITEM_FALSE = 29,
- ITEM_MULTI_TERM = 30,
+ ITEM_MAX = 30, // Indicates how long tables must be.
ITEM_UNDEF = 31,
};
diff --git a/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp b/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp
index b31173c74c2..f3706bfc7c1 100644
--- a/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp
+++ b/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp
@@ -186,8 +186,9 @@ SimpleQueryStackItem::AppendBuffer(RawBuf *buf) const
buf->appendCompressedPositiveNumber(_arg2); // allow_approximate
buf->appendCompressedPositiveNumber(_arg3); // explore_additional_hits
break;
- case ITEM_PREDICATE_QUERY: // not handled at all here
case ITEM_MULTI_TERM: // TODO: handle
+ case ITEM_PREDICATE_QUERY: // not handled at all here
+ case ITEM_MAX:
case ITEM_UNDEF:
abort();
break;