What is Primary index and Secondary indexes? What's the difference between them

What is Primary index?
What is Secondary indexes?
Primary index can only be created in Web UI?
Can java do it? If so, is the effect the same? … :smiling_face_with_tear:

primary index is on document key
secondary index is on document field

Both can be created via Web UI, SDks, curl

Thanks~ but . The primary key .Like primary key in RDBMS ?
In CouchBase. primary key is option item. if not setting .When execute Query statement is or not fast?

In Couchbase when ever u insert document you need to provide unique key and document value.
Primary key index is built on the unique document keys in the collection

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.