0

I am trying to download complete elastic search index using:

curl -o output_filename -m 600 -GET 'http://ip/index/_search?q=*&size=7000000'.

But its giving error:

{"error":"ArrayIndexOutOfBoundsException[-131072]","status":500}

How can I download complete index data?

Christian Gollhardt
  • 16,510
  • 17
  • 74
  • 111
Mohit Jain
  • 357
  • 2
  • 7
  • 18

1 Answers1

0

The scroll API is what you're looking for, which supports proper pagination:

Scrolling is not intended for real time user requests, but rather for processing large amounts of data

It's the same /_search endpoint but additional gets passed the ?scroll=<timeout> parameter.

Please be sure to understand what the timeout to e.g. scroll=1m means: it will keep alive your scroll context until you request the next batch/page.

Use the scroll_id from the response to request the next batch/page.

mark
  • 6,308
  • 8
  • 46
  • 57