NIP-91 : AND Operator in Filters
Enable AND within a single tag filter by using an & modifier in filters for indexable tags.
filters: {
"kinds": [1],
"&t": ["meme", "cat"],
"#t": ["meme", "cat", "black", "white"]
}
// returns kind `1` events with `t` tags that have both "meme" and "cat" that have the tag "black" or "white" by NIP-91 relays, whereas relays without NIP-91 return entire result for local intersection.Rules
ANDMUST take precedence overORby relays- Any tag value used in
ANDSHOULD be ignored inORby relays supporting NIP-91 - Tag values used in
ANDby libraries and clients MUST include standardORtags [#] for compatibility with relays that do not support NIP-91. - libraries and clients
SHOULDrun&post-filters after recieving results from relays; already standard practice.
Copied from the pending PR