I wanted to perform the above Elasticsearch query in java using the new Elasticsearch java api client . I am using Elasticsearch version 7.16 . Can someone please help me in building the same query using the new Elasticsearch java api client .
Hi @swallez ,
This looks perfect . Just one more doubt the of function is available for 7.16 and not for 7.15 version . If possible can you please share a solution which can be used for 7.15 as well .
Thanks in Advance .
Hi @swallez ,
With the above solution i could see query getting created correctly but i am getting below error in runtime .
co.elastic.clients.base.ApiException: null
at co.elastic.clients.base.rest_client.RestClientTransport.getHighLevelResponse(RestClientTransport.java:224)
at co.elastic.clients.base.rest_client.RestClientTransport.performRequest(RestClientTransport.java:104)
at co.elastic.clients.elasticsearch.ElasticsearchClient.search(ElasticsearchClient.java:1283)
Yes the issue got resolved while using 7.16.2 . Mapping aggregations from search response also seems to changed. Can you please help me with mapping aggregation values from search response as well ?
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.