Duplicated index

Hi, we have a 3 node cluster with Couchbase Server Community Edition 5.1.1 build 5723. version. We had implemented something to recreate index in case they were missing, unfortunately this was a bad idea cause we had one node down temporally and all index on that node were recreated, this caused the system to be very busy and to make it short we had to stop and restart all nodes and ended with several index duplicated with the same name.

How can I delete from 2 of 3 equal name index ? I see that there is an ID diferent for each one of them, but the drop sentence does not look like would use an id.

[
{
“indexes”: {
“condition”: “(schemaType = “mxhero:emailsync:task:account:email:error”)”,
“datastore_id”: “http://127.0.0.1:8091”,
“id”: “da7b250f79d30b85”,
“index_key”: [
schemaEntity”,
taskId”,
account”,
folderName”,
uid
],
“keyspace_id”: “mxhero_data”,
“name”: “emailsync_upload_error_index”,
“namespace_id”: “default”,
“state”: “online”,
“using”: “gsi”
}
},
{
“indexes”: {
“condition”: “(schemaType = “mxhero:emailsync:task:account:email:error”)”,
“datastore_id”: “http://127.0.0.1:8091”,
“id”: “acce75f6126e23e3”,
“index_key”: [
schemaEntity”,
taskId”,
account”,
folderName”,
uid
],
“keyspace_id”: “mxhero_data”,
“name”: “emailsync_upload_error_index”,
“namespace_id”: “default”,
“state”: “online”,
“using”: “gsi”
}
},
{
“indexes”: {
“condition”: “(schemaType = “mxhero:emailsync:task:account:email:error”)”,
“datastore_id”: “http://127.0.0.1:8091”,
“id”: “fe5932874142c84d”,
“index_key”: [
schemaEntity”,
taskId”,
account”,
folderName”,
uid
],
“keyspace_id”: “mxhero_data”,
“name”: “emailsync_upload_error_index”,
“namespace_id”: “default”,
“state”: “online”,
“using”: “gsi”
}
}
]

Did you try drop the index by name and see if it drops one of the three. If works repeat again. cc @deepkaran.salooja

That works, thanks for your help