1
votes

I'm following along with the N1QL tutorial for Couchbase and the first step is to create an index which is straight forward only part of the command that I am unclear about is the last parameter USING GSI can someone explain this. Initially I thought the GSI was a field specific to this bucket but it doesn't appear to be in any of the documents.

CREATE PRIMARY INDEX ON `beer-sample` USING GSI;
1
To further clarify, there are other options besides GSI, e.g. Views, but refer to the documentation on that. - Kirk

1 Answers

4
votes

USING GSI tells Couchbase to use an internal indexing technology called GSI (Global Secondary Indexing). GSI is the default, so you can leave out "USING GSI". It is not related to documents or data. The Couchbase documentation explains all of this in detail.