Description
INSERT INTO default VALUES("k01",{"id":1 , "o1" : {"ch":["a","b"] }}); |
CREATE INDEX ix20 ON default( ARRAY META().id FOR v IN o1.ch END); |
Above index has no entries in array
|
[] is indexed instead of ["k01,"k01"] |
CREATE INDEX ix21 ON default( DISTINCT ARRAY META().id FOR v IN o1.ch END); |
SELECT META().id FROM default WHERE ANY v IN o1.ch SATISFIES meta().id = "k01" END; |
Should use ix21 and return "k0" |
CREATE INDEX ix20 ON default( ARRAY id FOR v IN o1.ch END); |
indexes [1,1] |
Demonstrate just used scalar array. The problem will be with array index too