Empty result objects when using covering index for double unnest query

It is double nested array. Query should not have covered because it did not have s.iid in the index (change index ALL to DISTINCT so that it will do fetch and will not cover). It is bug (it handle one nested array only), in 7.1.0 as part of multiple array fields indexing this has been addressed.

Also Try this.

CREATE INDEX ix11 ON `test-data`(ALL ARRAY (ALL ARRAY [`c`.`tag`,s.iid] FOR c IN (`s`.`Channel`).`Characteristics` END) FOR s IN (`MINiML`).`Sample` END)`;


SELECT fltr[1] AS iid
FROM `test-data` AS t
UNNEST t.MINiML.Sample AS s
UNNEST s.Channel.Characteristics AS c
LET fltr = [`c`.`tag`,s.iid]
WHERE fltr >= ["strain"] AND fltr < [SUCCESSOR("strain")] ;
1 Like