Fetch ALL document of an Elastic engine using Elastic enterprise and NodeJS

39 Views Asked by At

I'm currently facing an issue using the '@elastic/enterprise-search' library on NodeJS. I have an Elastic engine containing 20 000 documents and I need to fetch all of them.

I tried a lot of stuff, but this library looks like capped at 10 000 items when fetching no matter the pagination and other tool that this library offers.

Does someone run into something similar or as a proposal alternative solution to overcome this issue?

Any help will be really much appreciated.

1

There are 1 best solutions below

0
On

The documentation clearly states

...up to 10000 documents...

What you can do is to bypass the app-search layer and use the standard ES client library to scroll over the entire underlying index directly.