Hi,
I'm trying to get the ids of all documents in my app search index. I tried to simply iteration of searches with an empty query and incrementally increasing the page-number. This seemed to work fine for the first 10 requests.
This is what my requests looks like:
{
"query": "",
"result_fields": {
"id": { "raw": {} }
},
"page": {"size": 1000,"current": [PAGENUMER] }
}
Where [PAGENUMBER] is 1 for the first request, 2 for second and so on…
This is the result of the 10th request:
{
"meta": {
"warnings": [],
"page": {
"current": 10,
"total_pages": 92,
"total_results": 91035,
"size": 1000
},
"request_id": "39684c716fe14725a70406a1a71789e4"
},
"results": [...] <--- 1000 results here
}
Working as expected and showing all 91035 docs in the index and that there are a total of 92 pages.
But the result of the 11th request:
{
"meta": {
"warnings": [],
"page": {
"current": 11,
"total_pages": 0,
"total_results": 0,
"size": 1000
},
"request_id": "39684c716fe14725a70406a1a71789e4"
},
"results": [] <--- 0 results here
}
Suddenly it indicates that there are no docs found at all…
The documentation says that search-request should support up to 1000 in page size and up to 500 pages, but it seems like it supports max 10 pages when page-size is 1000. Or is there some setting I need to change to support more result-pages?
Or is there some other way I can request ids of all docs in the index?
Any help would be appreciated