Hello,
I’m trying to build an index to target the following query:
SELECT
DISTINCT 'Mission::' || submission.missionId as missionIds
FROM brandbassador_dev submission
WHERE submission.docType="Submission"
AND (status = "request" OR offer IS NOT MISSING)
LIMIT 10
I’ve built the following index:
CREATE INDEX `idx_submission` ON `brandbassador_dev`(status, offer, missionId)
WHERE docType="Submission" AND ((status ="request") OR (offer IS NOT MISSING))
but it does not appear to target my query. Even if I use USE INDEX
to force the index to be used, it defaults to the primary index. Am I missing something here? I’m using Couchbase Community DP (4.6). Thanks!