use of com.yahoo.prelude.query.Item in project vespa by vespa-engine.
the class ParseTestCase method testSuffixWithWeight.
@Test
public void testSuffixWithWeight() {
Item root = tester.assertParsed("*suffix!200", "*suffix!200", Query.Type.ANY);
assertTrue(root instanceof SuffixItem);
}
use of com.yahoo.prelude.query.Item in project vespa by vespa-engine.
the class ParseTestCase method testIndexedSuffix.
@Test
public void testIndexedSuffix() {
Item root = tester.assertParsed("foo.bar:*suffix", "foo.bar:*suffix", Query.Type.ANY);
assertTrue(root instanceof SuffixItem);
}
use of com.yahoo.prelude.query.Item in project vespa by vespa-engine.
the class ParseTestCase method testPlusWordWebParsing1.
@Test
public void testPlusWordWebParsing1() {
Item root = tester.assertParsed("AND a b", "+a b", Query.Type.WEB);
assertTrue(((AndItem) root).getItem(0).isProtected());
assertFalse(((AndItem) root).getItem(1).isProtected());
}
use of com.yahoo.prelude.query.Item in project vespa by vespa-engine.
the class ParseTestCase method testSimpleQueryDefaultPhrase.
@Test
public void testSimpleQueryDefaultPhrase() {
Item root = tester.assertParsed("\"foobar foo bar baz\"", "foobar foo bar baz", Query.Type.PHRASE);
assertTrue(root instanceof PhraseItem);
assertFalse(((PhraseItem) root).isExplicit());
}
use of com.yahoo.prelude.query.Item in project vespa by vespa-engine.
the class ParseTestCase method testIndexSubstringExtraSpace.
@Test
public void testIndexSubstringExtraSpace() {
Item root = tester.assertParsed("OR foo substring*", "foo:* substring*", Query.Type.ANY);
assertTrue(((OrItem) root).getItem(0) instanceof WordItem);
assertTrue(((OrItem) root).getItem(1) instanceof PrefixItem);
}
Aggregations