N1QL index help

I have this index

CREATE INDEX idx_longitude_missing ON test((meta().id)) WHERE ((type = “Property”) and (summary.longitude) is missing))

And my query is

select meta().id FROM test WHERE type = “Property” AND summary.longitude is missing

Can anyone tell me what’s wrong? Why does the query refuses to use the index?

Thanks,

query must have predicate on leading index key.

CREATE INDEX idx_longitude_missing ON test (type) WHERE (( type = “Property”) and ( summary . longitude ) is missing));

1 Like