use of com.yahoo.prelude.searcher.ValidatePredicateSearcher in project vespa by vespa-engine.
the class ValidatePredicateSearcherTestCase method testQueryOutOfBounds.
@Test
public void testQueryOutOfBounds() {
ValidatePredicateSearcher searcher = new ValidatePredicateSearcher();
String q = "select * from sources * where predicate(predicate_field,0,{\"age\":200L});";
Result r = doSearch(searcher, q, "predicate-bounds [0..99]");
assertEquals(ErrorMessage.createIllegalQuery("age=200 outside configured predicate bounds."), r.hits().getError());
}
use of com.yahoo.prelude.searcher.ValidatePredicateSearcher in project vespa by vespa-engine.
the class ValidatePredicateSearcherTestCase method testValidQuery.
@Test
public void testValidQuery() {
ValidatePredicateSearcher searcher = new ValidatePredicateSearcher();
String q = "select * from sources * where predicate(predicate_field,0,{\"age\":20L});";
Result r = doSearch(searcher, q, "predicate-bounds [0..99]");
assertNull(r.hits().getError());
}
Aggregations