I've several objects that can be tagged, so the model is
type Content = {
...
tags : list(int)
...
}
How can I avoid loading all the records from MongoDB to check if the content is tagged by all the tags from a given list (AND logic)? or at list one of the tags of the given list (OR logic)?
I've tried flatting the list in a string to use regex, but I'm also stuck there as you can see here
I'm using this version of opa (I'm stuck with it for the moment)
OPA version 0.9.2
(c) 2007-2012 MLstate, All Rights Reserved.
Build: 1815-(fe5cc09)
Probably using the hole expression [_], something like that
/db/path/to/content[tags[_] == "value"]