use of com.yahoo.prelude.query.Item in project vespa by vespa-engine.
the class ParseTestCase method testNumberParsing.
@Test
public void testNumberParsing() {
Item root = tester.parseQuery("normal:400", null, Language.UNKNOWN, Query.Type.ANY, TestLinguistics.INSTANCE);
assertEquals(root.getCode(), 5);
}
use of com.yahoo.prelude.query.Item in project vespa by vespa-engine.
the class ParseTestCase method testIndexSubstringExtraSpace2.
@Test
public void testIndexSubstringExtraSpace2() {
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 WordItem);
}
use of com.yahoo.prelude.query.Item in project vespa by vespa-engine.
the class ParseTestCase method testDecimal.
@Test
public void testDecimal() {
Item root = tester.assertParsed("2.2", "2.2", Query.Type.ALL);
assertTrue(root instanceof IntItem);
tester.assertParsed("normal:2.2", "normal:2.2", Query.Type.ALL);
}
use of com.yahoo.prelude.query.Item in project vespa by vespa-engine.
the class ParseTestCase method testSuffixExtraStar.
@Test
public void testSuffixExtraStar() {
Item root = tester.assertParsed("*suffix", "**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 testNumberAsSubstring.
@Test
public void testNumberAsSubstring() {
Item root = tester.assertParsed("*89*", "*89*", Query.Type.ANY);
assertTrue(root instanceof SubstringItem);
}
Aggregations