I have a query like this one:
SELECT raw visitId FROM bucket WHERE type = "EVENT" AND (configurableMetadataId="XXX" OR ev.eventTypeId = "XXX)
And I would like to create a
GSI but I’m stuck with the
I tried to create 2 separated indexes:
CREATE INDEX idx_et ON bucket(eventTypeId) WHERE type = "EVENT"
CREATE INDEX idx_cm ON bucket(configurableMetadataId) WHERE type = "EVENT"
And I also tried a
CREATE INDEX idx_et_cm ON bucket(eventTypeId, configurableMetadataId) WHERE type = "EVENT"
But none of these options are working. The composite index would work if it was an
AND instead of an
OR but then how do I create an index working with an
PS: I’m using Couchbase server 4.5.1.