Total documents count in a certain engine

Hi, I am working on pushing data to app-search in a certain engine, i could see documents get created in the API Logs but the total number of the documents doesn't get increased.
Is there a API that I could create a RESTful request to see the total number of documents? or what is the issue there?

Thanks,
JL

An empty search request will give you the total number of documents

GET /engines/{{engine_name}}/search

{
  "query": "",
  "page": {
  	"size": 0
  }
}
{
    "meta": {
        "alerts": [],
        "warnings": [],
        "page": {
            "current": 1,
            "total_pages": 1,
            "total_results": 9598,
            "size": 0
        },
        "request_id": "98a4004bf8670a1ee135c3a0cd98f4c9"
    },
    "results": []
}

See the total_results field.

thanks a lot Jason

thanks Jason.
I have another question:
when I did a request (post) to get the meta data which includes the total_results, the number is different than what it showed in the UI. I got "total_results":10000 while it shows Total Documents is 560 on the Engine Overview.

Another question I have is that I did push around 2w+ documents to the same engine, why it gives the "total_results":10000 when I did the search request?

Thanks a lot,
JL

What version of App Search are you using?

Can you confirm which number is correct? Do you have 560 documents in your engine, or 10000?

Jason

I used version 7.3.0, and yesterday I upgraded the app-search to 7.6.1. None of them works.

Both of the number is not correct. I pushed around 3w+ documents as the end of yesterday. The total number in the UI stuck with 560 and the search request always be 10000 (when the total number of documents that I posted to this engine less than 10000, this search request gave the correct number, while after the number got to 100000, it stuck with 10000 and did not increase anymore).

Thanks,
JL

Oh my bad, you're right, queries are limited to 10,000 results.

Has the UI been stuck at 560 only after upgrading?

Yeap, the UI never changed after it got to 560.

Is there a way that I could know the correct number of documents in an engine?

Thanks a lot!

Hi @JyL :v: Could you try to index a new document, as that should trigger a background job that will update the count you see in the dashboard? Once the count hopefully updates, you can just delete that document again.