I have a query taken from kibana in JSON format. I have a java code where I am able to fire this same query using RestClient which is working fine.
Now the data being fetched is huge and so I want to use the scroll API to fetch the data in chunks.
The examples that I could find for scroll API is using RestHighLevelClient. But the problem is my query is in JSON format due to which it is giving exception as "no [query] registered for "[aggs]]"
There could be two solutions to my problem
- Connect to ES with RestClient, use scroll API and pass my query in JSON to it and get the output.
- Connect to ES with RestHighLevelClient, use scroll API and pass my query in JSON format and get the output
At present both the above approach are not working. Any help or lead will be very helpful