ParameterizedN1qlQuery with IN statement

That worked.

I stumbled across Getting meta().id with Covering Index and went back to look at my index.

I changed my create index statement from:

CREATE INDEX Idx_Core_Group_GroupProviderId
ON `core_north-europe`(`groupProviderId`)
WHERE docType="Group" USING GSI;

…to:

CREATE INDEX Idx_Core_Group_GroupProviderId
ON `core_north-europe`(`docType`,`groupProviderId`,META().id)
WHERE docType="Group" USING GSI;

…and now the query executes correctly from the client, and as a cover index, without a primary index present. It looks like the index needed both the META().id key and the docType key included (even though I’ve got a where clause on docType to behave).

Thanks for your help!

1 Like