aboutsummaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
Diffstat (limited to 'container-search')
-rw-r--r--container-search/abi-spec.json2
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/query/Item.java21
-rw-r--r--container-search/src/main/java/com/yahoo/search/grouping/request/DocIdNsSpecificValue.java4
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/QueryTree.java10
4 files changed, 14 insertions, 23 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..2e0c3cf8593 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
@@ -26,10 +26,7 @@ import java.util.Objects;
*/
public abstract class Item implements Cloneable {
- /**
- * The definitions in Item.ItemType must match the ones in
- * searchlib/src/vespa/searchlib/parsequery/parse.h
- */
+ // These must match the types in searchlib/src/vespa/searchlib/parsequery/parse.h
public enum ItemType {
OR(0),
AND(1),
@@ -38,7 +35,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 +56,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;
@@ -70,10 +66,7 @@ public abstract class Item implements Cloneable {
}
- /**
- * The definitions in Item.ItemCreator must match the ones in
- * searchlib/src/searchlib/parsequery/parse.h
- */
+ // These must match the definitions in searchlib/src/searchlib/parsequery/parse.h
public enum ItemCreator {
ORIG(0),
@@ -266,11 +259,11 @@ public abstract class Item implements Cloneable {
}
/**
- * Returns an integer that contains all feature flags for this item. This must be kept in sync with the flags
- * defined in searchlib/parsequery/parse.h.
+ * Returns an integer that contains all feature flags for this item.
*
* @return the feature flags
*/
+ // This must be kept in sync with the flags in searchlib/parsequery/parse.h.
private byte getFlagsFeature() {
byte FLAGS_NORANK = 0x01;
byte FLAGS_SPECIALTOKEN = 0x02;
@@ -419,7 +412,7 @@ public abstract class Item implements Cloneable {
* the back-end to identify specific items for ranking purposes.
*
* @param label label for this item
- **/
+ */
public void setLabel(String label) {
setHasUniqueID(true);
this.label = label;
diff --git a/container-search/src/main/java/com/yahoo/search/grouping/request/DocIdNsSpecificValue.java b/container-search/src/main/java/com/yahoo/search/grouping/request/DocIdNsSpecificValue.java
index 353e92c723f..b7d8ce9fc77 100644
--- a/container-search/src/main/java/com/yahoo/search/grouping/request/DocIdNsSpecificValue.java
+++ b/container-search/src/main/java/com/yahoo/search/grouping/request/DocIdNsSpecificValue.java
@@ -10,9 +10,7 @@ package com.yahoo.search.grouping.request;
*/
public class DocIdNsSpecificValue extends DocumentValue {
- /**
- * Constructs a new instance of this class.
- */
+ /** Constructs a new instance of this class. */
public DocIdNsSpecificValue() {
this(null, null);
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/QueryTree.java b/container-search/src/main/java/com/yahoo/search/query/QueryTree.java
index 115a2f6dbdc..3dac5648660 100644
--- a/container-search/src/main/java/com/yahoo/search/query/QueryTree.java
+++ b/container-search/src/main/java/com/yahoo/search/query/QueryTree.java
@@ -48,7 +48,7 @@ public class QueryTree extends CompositeItem {
return getRoot().encode(buffer);
}
- //Lets not pollute toString() by adding "ROOT"
+ // Let's not pollute toString() by adding "ROOT"
protected void appendHeadingString(StringBuilder sb) {
}
@@ -65,7 +65,7 @@ public class QueryTree extends CompositeItem {
if (this.getItemCount() == 0) // initializing
super.addItem(root);
else
- setItem(0,root); // replacing
+ setItem(0, root); // replacing
}
@Override
@@ -88,7 +88,7 @@ public class QueryTree extends CompositeItem {
@Override
public void addItem(Item item) {
- if (getItemCount()==0)
+ if (getItemCount() == 0)
super.addItem(item);
else
throw new RuntimeException("Programming error: Cannot add multiple roots");
@@ -96,8 +96,8 @@ public class QueryTree extends CompositeItem {
@Override
public void addItem(int index, Item item) {
- if (getItemCount()==0 && index==0)
- super.addItem(index,item);
+ if (getItemCount() == 0 && index == 0)
+ super.addItem(index, item);
else
throw new RuntimeException("Programming error: Cannot add multiple roots, have '" + getRoot() + "'");
}