Unable to access data added to default bucket using N1QL

Let me clarify a bit what @matthew said: you need to use backticks if your bucket name has restricted characters in there, like “-”. So for default it should be fine, but it’s best practice to always do it like this.

Now onto your question: How quickly did you add the data before querying? Because by default the index is updated eventually, which means it might take some time that it is included in the results. You can use query parameters to override that behaviour.

Also, which index type are you using?