How to retrieve bulk document from elasticsearch using Java HTTP client

Hi,

We have around billions of documents in elastic search, we would like to do bulk retrieval from elastic using Java HTTP client. Can someone recommend best approach of doing this. It would be really helpful if any sample is available.

Thanks

Hi,

If you want to retrieve all your documents, you have to run a query match_all() (https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-query-dsl-match-all-query.html) using a scroll (https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-search-scrolling.html).

bye,
Xavier

Thanks @xavierfacq!

Can we do the same thing using HTTP client?

yes you can !

https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-request-scroll.html

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