Build index fails. Index xxx_yyy_zzz_idx will retry building in the background for reason: Build Already In Progress

[
{
“code”: 5000,
“msg”: “BuildIndexes - cause: Build index fails. Index xxx_yyy_zzz_idx will retry building in the background for reason: Build Already In Progress. Bucket data1. Indexer will retry building index at later time…\n”,
“query_from_user”: “BUILD INDEX ON data1(xxx_yyy_zzz_idx)”
}
]

I get the above when I try to build the following index (names changed, of course):

CREATE INDEX xxx_yyy_zzz_idx ON data1((split((meta().id), “::”)[0]),zeroKeyId) WHERE ((split((meta().id), “::”)[1]) in [“oneKeyId”, “crowdCompassSessionConfiguration”, “twoKeyId”]) WITH { “defer_build”:true, “num_replica”:1 }

It appears we already have indexing going on, so that might be correct error.

Can you only perform one BUILD INDEX at the same time?

@unhuman, yes only one BUILD INDEX at the same time. But multiple indexes can be built as part of a single BUILD INDEX. See documentation - https://developer.couchbase.com/documentation/server/5.1/n1ql/n1ql-language-reference/build-index.html

1 Like

@deepkaran.salooja
Is the limitation of one BUILD INDEX at a time per bucket or for all buckets?

@avinash.kolluru, one BUILD INDEX at a time per bucket. Please note that you can always build multiple indexes with one BUILD INDEX.