Enterprise 6.5
Say I have a doc like this
{
type: ‘thing’
field1: …,
field2: …
arrayfield: [{x:…, y…, z…}, {x:…, y:…, z:…}, …]
}
I want do a query like this:
Select
field1
from default
where type = ‘thing’ and any x in arrayField satisfies x.x = ‘a’ and x.y = ‘b’ and x.z = ‘c’ end
so I make an index like this
(distinct (array x.x for x in arrayField when x.y = ‘b’ and x.z = ‘c’ end), field1) where type = ‘thing’
The above doesn’t hit this index even when I specify it with use index?
Is it possible that the indexer isn’t smart enough to recognize the partiality of the array contents?
If so is there a way to do this?