This commit is contained in:
Sandwich 2025-08-12 22:26:01 +00:00 committed by GitHub
commit def6c061a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 0 deletions

18
119.md Normal file
View File

@ -0,0 +1,18 @@
# NIP-119: 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": ["black", "white"]
}
// returns kind `1` events with `t` tags that have both "meme" and "cat" that have the tag "black" or "white"
```
## Rules
- `AND` **MUST** take precedence over `OR`
- Tag values used in `AND` **SHOULD NOT** be used in standard `OR` tags [`#`]
- Any tag value used in `AND` **SHOULD** be ignored in `OR`