blob: 7ac15ae2819a7b1ee3aef10a519b893269accf4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# 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": ["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`
|