1 person found this helpful
Unfortunately there isn't a way to easily do a multi-level AND/OR structure. Your best bet (and I have no idea how performant it would be), would be to use the ExecuteBatch service:
and construct multiple API calls together using various permutations and then mesh the results together based on resources > self > ref values.
You'll definitely want to minimize the fields being returned to expedite transit of all the queries, and probably limit the result sets to a nominal value like 10-25...to insure that the system doesn't overly dig too deep.
Hope that helps.