Get all of the documents for user in elastic enterprise search

Hi @CTO_Servefast

The only way i had some success was using client.app.search() using empty string for query but it seems unreliable

Can you expand on what makes it seem unreliable? The App Search search query should return all docs ordered by ID by default.

If docs are being added, deleted, updated, etc. during the search operation and that search result is paginated, there could be some inconsistencies in the results. You can resolve that by using point in time API, but to do this you'd need to use the Elasticsearch JS client to send the requests to Elasticsearch instead of Enterprise Search.