I have the following query:
SELECT META().id _ID, META().cas _CAS, a, b, c, d, e, f, g FROM myBucket WHERE documentType = "myDocType" AND d IS NOT NULL
And I created this index:
CREATE INDEX abc ON myBucket(META().id, META().cas, a, b, c, d, e, f, g, documentType)
But when I run an
EXPLAIN the index is not taken into account. I tried with USE INDEX and no effect either.
What am I missing? What are the general rules to define a covering index? (Note: My project uses v4.1).