Porting to High Level Rest Client

The transport client supports the following Elastic example:

AggregationBuilder aggregation =
AggregationBuilders
.significantTerms("significant_countries")
.field("address.country");

		SearchResponse sr = client.prepareSearch()
		        .setQuery(QueryBuilders.termQuery("gender", "male"))
		        .addAggregation(aggregation)
		        .get();

I cannot locate in the REST client a point where .setQuery() can be invoked.
My objective is to establish an overall query for a multi-bucket aggregation.

Thanks

searchSourceBuilder.query(QueryBuilders.boolQuery());
for example

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.