I am working with 4.6 and I have been through ever section of the Array index documentation and I have figure this out. It seems like the core scenario is that you create in index with that looks simialr to Distinct ARRAY [item.p1, item.p2] for item in items END
but using the predicate of someArray = [“v1”, v2"] is not workable from withing a query since the cross product of all of the items I need to filter on could be VERY large. I’ve tried using several SATISFIES claues but hat hasn’t worked.
Here is the query I am working with:
[oo] as opportunities,
from app v
unnest v.opportunities as oo
type = "visit"
and v.tenantName = “t”
any o in v.opportunities SATISFIES (o.state in ["New", "InProcess","PendingReview"] OR (o.state = "ChangeApplied" and o.rebillState = 10)) AND o.assignedToTeamId in ["team1", "team2", "team3"] END
and oo.assignedToTeamId in [“team1”, “team2”, “team3”]
and (oo.state in [“New”, “InProcess”,“PendingReview”]
OR (oo.state = “ChangeApplied” AND oo.rebillState = 10))