.range().onField("age").boostedTo(2f).below(20).createQuery();
Query query = Search.getSearchManager(cache).buildQueryBuilderForClass(Person.class).get().bool()
.should(subQuery1).should(subQuery2).createQuery();
CacheQuery cacheQuery = Search.getSearchManager(cache).getQuery(query);
List<Object> found = cacheQuery.list();
Assert.assertEquals(3, found.size());
assert found.get(0).equals(person1);
assert found.get(1).equals(person2);
assert found.get(2).equals(person3);
subQuery1 = Search.getSearchManager(cache).buildQueryBuilderForClass(Person.class).get()
.keyword().onField("name").boostedTo(3.5f)
.matching("Goat").createQuery();
query = Search.getSearchManager(cache).buildQueryBuilderForClass(Person.class).get().bool()
.should(subQuery1).should(subQuery2).createQuery();
cacheQuery = Search.getSearchManager(cache).getQuery(query);
found = cacheQuery.list();
Assert.assertEquals(3, found.size());
assert found.get(0).equals(person2);
assert found.get(1).equals(person3);
assert found.get(2).equals(person1);