CREATE INDEX `bsnapshotidx` ON `vigorlending` (DISTINCT ARRAY v.bailoutid FOR v IN bailoutSnapshot END) WHERE type="bailoutSnapshot";
Array seems to be correct, I want to search objects of type bailoutSnapshot to find if any element in the bailoutSnapshot array (an array in the object root) has a bailoutid that I’m searching for.
SELECT * FROM `vigorlending` WHERE type = "bailoutSnapshot" AND ANY v IN bailoutSnapshot SATISFIES v.bailoutid=500 END;
This query seems to be correct, and it does use my index, however it returns zero results, what did I miss?
Objects I’m searching look like this