Cannot Create a new Index

Cannot create a new Index keep getting error:

GSI CreatePrimaryIndex() - cause: Index Replica not supported in non-Enterprise Edition

But interesting thing is I had an indexes on the node which went down with failover. So does it means I cannot create index anymore ?

PS: I’m using Community Edition 6.0.0 build 1693

Hi @rusyasoft,

You are seeing this error because creation of an index with replicas is not allowed in community edition. Please check “num_replica” in the indexer settings. If the value of num_replica is one(1) or higher you will see this error. So please retry by setting this value to zero.

Also, check your “create index” statement. If the create index statement has as “with clause” that specifies “num_replica”, please try again by removing that clause.

If you want to create an index with replicas, please use enterprise edition.


@amit.kulkarni Thank You for your response

That was the point , I have removed the enable replica checkbox from Bucket settings and obviously didn’t put any with clause while querying create index statement. It almost felt like a bug :frowning:

For last confirmation: the indexer settings is the one we set from the bucket settings (through Web-console) right ?

Hi @rusyasoft,

The checkbox from bucket settings (on UI) is not related to index creation. That bucket setting decides number of replicas for the key-value store data. Data service ensures the replication of key-value store data.

But the error in index creation is not affected by that setting. Index itself can have its own replicas. To check if “num_replica” in indexer setting please use following command.

curl -X GET -u <cluster-admin-username>:<password> http://<indexer-node-ip-addr>:9102/settings

Result of this command will be a json which returns indexer settings. One of the settings will be “indexer.settings.num_replica”. Please check the value. The default value should be zero.

If you see a non-zero value, that might be the root cause of the problem. You can use following command to set it to zero.

curl -X POST -u <cluster-admin-username>:<password> http://<indexer-node-ip-addr>:9102/settings --data '{"indexer.settings.num_replica": 0}'

Even after trying out above steps you are still facing the failure in index creation, please attach indexer.log and query.log files. I will need the logs for further investigation.


Thank you @amit.kulkarni for detail answer.

I think you are right, while I was playing with replication I did some mistake call and setup that num_replica value to 1.
I cannot confirm it in detail now, Because I didn’t have time to wait for more, So I built another cluster and moved all data to new cluster using XDCR. Old cluster with that problem has been gone, cannot check that request.

Now I checked settings request in a new cluster and indexer.settings.num_replica is 0 as you have said.

I will definitely try to post num_client:2 next time again for detail confirmation! :slight_smile: