Match All Query

how can I get all documents in an index using java?

Do I use the Match All Query or Scroll API?

If Match All, what do I do after this? :

MatchAllQueryBuilder queryBuilder = QueryBuilders.matchAllQuery();

How do I specify the index to use?

The query is the query to apply either to the Search API or to the Scroll API.

To extract all data (let say more than 10000), you should use scroll API indeed.

See https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-search-scroll.html

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