* <br>See <a href="http://www.elasticsearch.org/guide/reference/query-dsl/range-query.html">documentation</a>
* <br>See <a href="http://www.elasticsearch.org/guide/reference/query-dsl/bool-query.html">documentation</a>
*/
@Test
public void query_and_filter_Search() throws Exception {
QueryBuilder query = QueryBuilders
.boolQuery()
.must(
QueryBuilders.matchQuery("brand", "HEINEKEN")
)
.must(
QueryBuilders.rangeQuery("price").from(5).to(10)
);
FilterBuilder filter = FilterBuilders.rangeFilter("size").from(1);
QueryBuilder qb = QueryBuilders.filteredQuery(query, filter);
logger.info("Your query is : {}", qb);
SearchResponse sr = node.client().prepareSearch("meal").setQuery(qb)
.execute().actionGet();