aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/select/SelectTestCase.java
diff options
context:
space:
mode:
authorAlexey Chernyshev <aleksei@spotify.com>2022-03-18 11:48:03 +0100
committerAlexey Chernyshev <aleksei@spotify.com>2022-03-23 16:21:04 +0100
commit984c1acbfe71589aba7ab14dab00359f009fed9e (patch)
treedec3705741f6771cd00ed34a1d965b3a22e58f34 /container-search/src/test/java/com/yahoo/select/SelectTestCase.java
parentd9805209e3b0e33be3c0cc454c4604043663c1c4 (diff)
Addressing comments + fixing test
Diffstat (limited to 'container-search/src/test/java/com/yahoo/select/SelectTestCase.java')
-rw-r--r--container-search/src/test/java/com/yahoo/select/SelectTestCase.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/container-search/src/test/java/com/yahoo/select/SelectTestCase.java b/container-search/src/test/java/com/yahoo/select/SelectTestCase.java
index 1c8433541e1..9b867be1484 100644
--- a/container-search/src/test/java/com/yahoo/select/SelectTestCase.java
+++ b/container-search/src/test/java/com/yahoo/select/SelectTestCase.java
@@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yahoo.prelude.query.AndItem;
import com.yahoo.prelude.query.ExactStringItem;
+import com.yahoo.prelude.query.FuzzyItem;
import com.yahoo.prelude.query.Item;
import com.yahoo.prelude.query.PhraseItem;
import com.yahoo.prelude.query.PrefixItem;
@@ -676,8 +677,11 @@ public class SelectTestCase {
@Test
public void testFuzzy() {
- assertParse("{ \"contains\": [\"description\", { \"fuzzy\": [\"a\"] }] }",
- "FUZZY description:a");
+ QueryTree x = parseWhere("{ \"contains\": [\"description\", { \"fuzzy\": [\"a b\"] }] }");
+ Item root = x.getRoot();
+ assertSame(FuzzyItem.class, root.getClass());
+ assertEquals("description", ((FuzzyItem) root).getIndexName());
+ assertEquals("a b", ((FuzzyItem) root).stringValue());
}
//------------------------------------------------------------------- grouping tests