aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/search/searchers
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-06-19 09:36:51 +0000
committerArne Juul <arnej@verizonmedia.com>2020-06-19 09:36:51 +0000
commitae1297268fa447f7fb7f2f548d4f32c5327ec187 (patch)
treedb10da7ae3848d24d9be728175b36b9596d1e19b /container-search/src/test/java/com/yahoo/search/searchers
parentb70147cbdc3139ae9ea43b8341b79b3e1cbbdd1b (diff)
update SelectParser and add targetHits
* targetHits is now the preferred annotation replacing targetNumHits (for wand,weakand,nearestneighbor), the old name still works as an alias * note: targetNumHits is still produced when serializing to YQL * debugging/trace output will print the "targetHits" form * add nearestNeighborItem support to SelectParser * implement disclose() in nearestNeighborItem
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/searchers')
-rw-r--r--container-search/src/test/java/com/yahoo/search/searchers/ValidateNearestNeighborTestCase.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/searchers/ValidateNearestNeighborTestCase.java b/container-search/src/test/java/com/yahoo/search/searchers/ValidateNearestNeighborTestCase.java
index 2c849a9b52c..c49603737a6 100644
--- a/container-search/src/test/java/com/yahoo/search/searchers/ValidateNearestNeighborTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/searchers/ValidateNearestNeighborTestCase.java
@@ -93,7 +93,7 @@ public class ValidateNearestNeighborTestCase {
}
private String makeQuery(String attributeTensor, String queryTensor) {
- return "select * from sources * where [{\"targetNumHits\":1}]nearestNeighbor(" + attributeTensor + ", " + queryTensor + ");";
+ return "select * from sources * where [{\"targetHits\":1}]nearestNeighbor(" + attributeTensor + ", " + queryTensor + ");";
}
@Test
@@ -139,7 +139,7 @@ public class ValidateNearestNeighborTestCase {
r.append(",queryTensorName=").append(qt);
r.append(",hnsw.exploreAdditionalHits=0");
r.append(",approximate=true");
- r.append(",targetNumHits=").append(th);
+ r.append(",targetHits=").append(th);
r.append("} ").append(errmsg);
return r.toString();
}
@@ -149,7 +149,7 @@ public class ValidateNearestNeighborTestCase {
String q = "select * from sources * where nearestNeighbor(dvector,qvector);";
Tensor t = makeTensor(tt_dense_dvector_3);
Result r = doSearch(searcher, q, t);
- assertErrMsg(desc("dvector", "qvector", 0, "has invalid targetNumHits 0: Must be >= 1"), r);
+ assertErrMsg(desc("dvector", "qvector", 0, "has invalid targetHits 0: Must be >= 1"), r);
}
@Test