Q: how to rebuild index after restore couchbase server backup file

index

#1

hi:
my environment:

  • couchbase server 5.2
    when I restore couchbase server backup data to a new server, it seems all right, but the index hasn’t rebuild for me. I refer official document, use BUILD PRIMARY INDEX #primary ON kitchen WITH { “defer_build”:true } , will get error:
    [
    {
    “code”: 3000,
    “msg”: “syntax error - at PRIMARY”,
    “query_from_user”: “BUILD PRIMARY INDEX #primary ON kitchen WITH { “defer_build”:true }”
    }
    ]
    my question is : how can I rebuild all index after restore couchbase server data.

best regard


#2
BUILD INDEX ON
 kitchen(`#primary`);

At present you need to explicitly provide index names BUILD INDEX ON kitchen(ix1, ix2,…);
There is improvement is coming in next releases MB-32153


#3

thanks for your reply.