Inverted way searching

I've indexed a product like this:
name: "abc",
permissions : [{
"path" : "x/y",
"rights" : [
I need to get all the products having the user rights of the current user.
For example, if the user has userRights "right1","right2","right3" , so the product should be returned from the query. While if the user has "right2","right3","right4" so this product will not be returned as the user hasn't the full permissions to access the product.

A normal query where you search if the index contains a given value or not, while what i need to check if this index has all the rights needed.

How to build a query like that?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.