mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-03-25 17:21:52 +01:00
Merge b792e36eebc4df0464d5290c3dda20f38a3d7242 into 0619f370bca3485bb9c5870bc2defa03c7c3d10e
This commit is contained in:
commit
486d1b016f
18
119.md
Normal file
18
119.md
Normal 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`
|
Loading…
x
Reference in New Issue
Block a user