I'm trying to write code that checks if a document that I just uploaded to Azure Search has been fully indexed and is ready to be found through searches. I'm having trouble finding a way to do this.
Here's some things I've tried, using the ISearchIndexClient
from the NuGet SDK:
- I've tried doing a
search=* & filter=id eq {myguid}
search, but that would give false positives (return results, when searching for fields other thanid
would not yet return the document) - I've tried doing
search={myguid}
but then the fuzzyness of the search would yield multiple documents - I've tried using
Documents.Get<T>(key)
on the document, but that will give false positives (as kindof expected) - I've tried using
Documents.Count()
on the index to see that an extra document was added, but that also gives false positives (the count is increased before a document is searchable)
Is there any reliable way in Azure Search using either the SDK or alternatively with the API directly to know that a document has been fully indexed and is searchable?