Alter Index on Multiple Indexes

So, building indexes has an “all indexes” coverage with:

BUILD INDEX ON `travel-sample` (( 
  SELECT RAW name 
  FROM system:indexes
  WHERE keyspace_id = 'travel-sample'
    AND state = 'deferred' ));

the helpful page
but i cannot find any alter index documentation showing a similar implementation that would have one alter command apply to all indexes at once.
the unhelpful page
Is there a savvy way alter all indexes cluster to have two replicas?
I am currently running a single node cluster and would like to upgrade to a triple node cluster, with two of them having the index service.
ps, the current node will not be having the index service after the upgrade, so a querry that creates replica on two nodes and drops replica on one (for all indexes) would be golden.

Currently it is not possible multiple alter indexes at same time. You can write script. MB-40166

1 Like

the current node will not be having the index service after the upgrade,

Just to clarify, currently there is no way to “remove” a service from an existing node in the cluster. How do you plan to go about it? Are you using CE or EE?

i plan to remove, rebalance, add, rebalance. I’d like to implement this on EE.

alright. could you please share the link on how to do that with the python SDK?

@wanda_a Start Using the Python SDK | Couchbase Docs is a good starting point. Alternatively, you could use cbqshell (cbq: The Command Line Shell for SQL++ | Couchbase Docs). Hope this helps.

1 Like