We create a following document in couchbase
There are indexes both on customer id and account id attributes.
Once create of this document is finished and we answer back with an Id to consumer there is immediately a query call being made with either customer id or account id and that is resulting in document not found.
Difference between create and query call is in magnitude of 10-50 msec
We believe there is a certain amount of time being taken for index to be updated which is resulting in document not found. However if same query is done after 1 or 2 secs there is no issue.
For this purpose we are now planning to introduce a delay in create call before we answer consumer back. This is more a workaround and we are aware of the fact that indexes are updated asynchronously. Is there any way that we can reduce the delay there?
We are using Couchbase Community Edition 6.0