use of com.yahoo.prelude.query.PrefixItem in project vespa by vespa-engine.
the class ParseTestCase method testSinglePrefixTerm.
@Test
public void testSinglePrefixTerm() {
Item root = tester.assertParsed("prefix*", "prefix*", Query.Type.ANY);
assertTrue(root instanceof PrefixItem);
}
use of com.yahoo.prelude.query.PrefixItem in project vespa by vespa-engine.
the class ParseTestCase method testPrefixWithWeight.
@Test
public void testPrefixWithWeight() {
Item root = tester.assertParsed("prefix*!200", "prefix*!200", Query.Type.ANY);
assertTrue(root instanceof PrefixItem);
}
use of com.yahoo.prelude.query.PrefixItem in project vespa by vespa-engine.
the class ParseTestCase method testNumberAsPrefix.
@Test
public void testNumberAsPrefix() {
Item root = tester.assertParsed("89*", "89*", Query.Type.ANY);
assertTrue(root instanceof PrefixItem);
}
use of com.yahoo.prelude.query.PrefixItem 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);
}
use of com.yahoo.prelude.query.PrefixItem in project vespa by vespa-engine.
the class ParseTestCase method testPrefixExtraStar.
/**
* Extra star is ignored
*/
@Test
public void testPrefixExtraStar() {
Item root = tester.assertParsed("prefix*", "prefix**", Query.Type.ANY);
assertTrue(root instanceof PrefixItem);
}
Aggregations