{"id":"6ad0568c063a5ee63d3f24ca5c45ff8559d23a67a9b93660631bf26308b17e05","pubkey":"266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5","created_at":1782768922,"kind":30817,"tags":[["d","nip-91"],["title","NIP-91 : AND Operator in Filters"],["alt","Nostr Implementation Possibility: NIP-91 : AND Operator in Filters"],["client","NostrHub"]],"content":"Enable `AND` within a single tag filter by using an `&` modifier in filters for indexable tags.\n\n```\nfilters: {\n  \"kinds\": [1],\n  \"&t\": [\"meme\", \"cat\"],\n  \"#t\": [\"meme\", \"cat\", \"black\", \"white\"]\n}\n// 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.\n```\n\n## Rules\n\n- `AND` **MUST** take precedence over `OR` by relays\n- Any tag value used in `AND` **SHOULD** be ignored in `OR` by relays supporting NIP-91 \n- Tag values used in `AND` by libraries and clients **MUST** include standard `OR` tags [`#`] for compatibility with relays that do not support NIP-91.\n- libraries and clients `SHOULD` run `&` post-filters after recieving results from relays; already standard practice.  \n\n---\n\nCopied from [the pending PR](https://github.com/nostr-protocol/nips/pull/2252)","sig":"de3456c1a7e462d2f4457a4d41035276df3650450d33deb1011e3f6cdae50616143eb30946929b0ef453922f7501ff6d7edd92ca9d99a914403a93d9519f7a48"}