Cannot create indexes in couchbase analytics

I am trying to create indexes on our couchbase analytics collections but it keep giving a syntax error even after following the documentation for creating indexes in analytics:-

CREATE index idx_alaminosbilldevbillingmasteraccount ON alaminos_billingmasteraccount(wogismodelid);

[
{
“code”: 24001,
“msg”: “Compilation error: cannot find type of field ‘wogismodelid’ (in line 1, at column 86)”,
“query_from_user”: “CREATE index idx_alaminosbilldevbillingmasteraccount ON alaminos_billingmasteraccount(wogismodelid);”
}
]

Can someone suggest?

Hi @tanmay,
You need to specify the type for the field “wogismodelid”.
See the detailed syntax for creating a secondary index in Analytics here Data Definition Language (DDL) | Couchbase Docs

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.