How to retrieve bulk document from elasticsearch using Java HTTP client


#1

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


(Xavier Facq) #2

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


#3

Thanks @xavierfacq!

Can we do the same thing using HTTP client?


(Xavier Facq) #4

yes you can !

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


(system) #5

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