Is there a way to get a specifig field from the response like the aggregation field...
(i know about parsing the json text, I am just asking about a common and better solution you are using)
So you want to run the search but only get the aggregation back? Set the size to 0. In the master branch that method is called setSize. The aggregation should be available in the getAggregations method. The REST API has response filtering but I believe that is a thing implemented on the REST layer so it doesn't have an analog in the java API.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.