Search code examples
couchbasesql++

How to add couchbase index replicate without deleting it


I have in my environment one secondary index (without replication) and I want to know how do I create the replicates without dropping the index?

I don't want to delete the index and recreate it with the replicates because I am not using the primary index, hence the constraint.

Thanks


Solution

  • If it's not possible to alter the index replicat count with your Couchbase version:

    You should :

    1. Create the same index with different name (this time replicated)

    2. Drop the index not replicated after the creation of the first index.

    reference :

    https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/alterindex.html