Karamjit Singh
Karamjit Singh

Reputation: 31

Can I create same index for 2 buckets in couchbase?

I am new to couchbase and I have a requirement to create same index (same index create statement) on 2 buckets. Can I use same index name for 2 buckets?

Upvotes: 3

Views: 47

Answers (1)

Matthew Groves
Matthew Groves

Reputation: 26096

I just tried this in Couchbase Server 6.5.1:

CREATE INDEX ix_foo ON `bucket1` (bar,baz,qux);
CREATE INDEX ix_foo ON `bucket2` (bar,baz,qux);

And yes, it is allowed.

Upvotes: 3

Related Questions