mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-13 23:39:08 -05:00
NIP-50 search filter should work with multiple values to use them with AND condition in the same way kinds
and authors
are used
This commit is contained in:
parent
e3504024a2
commit
ebd18d5cca
6
50.md
6
50.md
|
@ -18,10 +18,10 @@ A new `search` field is introduced for `REQ` messages from clients:
|
|||
```json
|
||||
{
|
||||
...
|
||||
"search": <string>
|
||||
"search": <a list of strings>
|
||||
}
|
||||
```
|
||||
`search` field is a string describing a query in a human-readable form, i.e. "best nostr apps".
|
||||
`search` field is a list of strings describing a query in a human-readable form, i.e. "best nostr apps".
|
||||
Relays SHOULD interpret the query to the best of their ability and return events that match it.
|
||||
Relays SHOULD perform matching against `content` event field, and MAY perform
|
||||
matching against other fields if that makes sense in the context of a specific kind.
|
||||
|
@ -29,7 +29,7 @@ matching against other fields if that makes sense in the context of a specific k
|
|||
A query string may contain `key:value` pairs (two words separated by colon), these are extensions, relays SHOULD ignore
|
||||
extensions they don't support.
|
||||
|
||||
Clients may specify several search filters, i.e. `["REQ", "", { "search": "orange" }, { "kinds": [1, 2], "search": "purple" }]`. Clients may
|
||||
Clients may specify several search filters, i.e. `["REQ", "", { "search": ["orange"] }, { "kinds": [1, 2], "search": ["green", "purple"] }]`. Clients may
|
||||
include `kinds`, `ids` and other filter field to restrict the search results to particular event kinds.
|
||||
|
||||
Clients SHOULD use the supported_nips field to learn if a relay supports `search` filter. Clients MAY send `search`
|
||||
|
|
Loading…
Reference in New Issue
Block a user