Create index on a bucket with a single command?

Hello,

To create an index on a bucket, I need to

  1. SSH into a server
  2. Run cbq
  3. Execute “create primary index on [bucket] using GSI”

Is there a single command that can create an index?

We would like to automate our release process completely on the could without SSHing to a server.

Hi, you can use the N1QL REST API :http://developer.couchbase.com/documentation/server/4.1/n1ql/n1ql-rest-api/exsuccessful.html
This can also be executed by your SDK.

1 Like