Porting to High Level Rest Client


#1

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


#2

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


(system) #3

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