When is the inserted document available to get by id and search by fields?

I do some tests and see, that my inserted document is not available for search by field after a few milliseconds (local machine). Is it any way to know, that document is ready for searching by field?
Same questions for loading by id.

Hello @leonidv welcome to the forums !

My understanding is that you are trying to fetch a document after inserting the document using FTS or N1QL, regardless of these approach you will have to pass in scanConsistency SearchOptions (FTS) or QueryOptions (N1QL)


The documentation above should be able to give you examples. For by the id/key best would be to use KV operation
documentation can be found here

Hi Arun!
Thanks for the advice, scan consistency is work for me.

But for some cases is very important, that after ACK from the database I can immediately load the document from the database:

  • Does REQUEST_PLUS guarantee that I can search the document immediately?
  • Does loading by key (k/v operations) work immediately?