Thanks for your reply it s working with primary index not for secondary index.,As per the couch base admin its not recommend to create primary index for the bucket so we are not able to execute the above query.
Is there any possibility to execute this query on secondary index.
INSERT INTO default VALUES(“k0”,{“name”:“xyz”});
CREATE INDEX ix1 on default(name);
SELECT META().id, * FROM default WHERE name IS NOT NULL;
SELECT META().id, * FROM default WHERE name = “xyz”;
SELECT META().id, * FROM default WHERE name >= “xyz”;
@veerareddy.boddapati- Years ago, we made the design decision to keep the key/id separate from the document body. This is in part because Couchbase supports some use cases where the value may not be JSON and can be arbitrary bytes specified by the app developer. The other reason is that the identification of a node responsible for a document without needing to do any across-the-wire index lookups gives Couchbase a great performance advantage for those (very common!) use cases.
Our request doesn’t have the document id and we have some of the fields as part of the document in our request.
We are using N1QL query to fetch the data based on the request. But we are seeing its taking more time to fetch the data. I s there any other way to get more performance.