Is there a delay between inserting a document and it being queryable?

I am using the latest version of couchbase CE.

What I am doing:
I insert a document via the nodejs api. I immediately run a n1ql query that aggregates that document.

If I call the n1ql query immediately after the insert the document is not found. If I delay the query the document is found. Is this standard behavior?

Yes. Please consult the documentation about scan consistency in N1QL.

Thank you for helping me so quickly. I didn’t know what that concept was called.

1 Like