0

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.

MrLenoir
  • 30
  • 6
  • Are you using the `listDocuments` method?https://www.elastic.co/guide/en/enterprise-search-clients/enterprise-search-node/8.8/workplace-search-api.html#workplace-search-api-documents-list – Val Jun 14 '23 at 15:32
  • @Val Yes I am using this listDocuments function. I see in your link that it is the `client.workplace.listDocuments` but I'm using `client.app.listDocuments` could it be the issue? – MrLenoir Jun 14 '23 at 15:42
  • No it's the same for both. – Val Jun 14 '23 at 16:09

1 Answers1

1

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.

Val
  • 207,596
  • 13
  • 358
  • 360