diff options
Diffstat (limited to '50.md')
| -rw-r--r-- | 50.md | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -26,6 +26,8 @@ Relays SHOULD interpret the query to the best of their ability and return events | |||
| 26 | Relays SHOULD perform matching against `content` event field, and MAY perform | 26 | Relays SHOULD perform matching against `content` event field, and MAY perform |
| 27 | matching against other fields if that makes sense in the context of a specific kind. | 27 | matching against other fields if that makes sense in the context of a specific kind. |
| 28 | 28 | ||
| 29 | Results SHOULD be returned in descending order by quality of search result (as defined by the implementation), | ||
| 30 | not by the usual `.created_at`. The `limit` filter SHOULD be applied after sorting by matching score. | ||
| 29 | A query string may contain `key:value` pairs (two words separated by colon), these are extensions, relays SHOULD ignore | 31 | A query string may contain `key:value` pairs (two words separated by colon), these are extensions, relays SHOULD ignore |
| 30 | extensions they don't support. | 32 | extensions they don't support. |
| 31 | 33 | ||
| @@ -41,9 +43,13 @@ implementation details between relays. | |||
| 41 | Clients MAY verify that events returned by a relay match the specified query in a way that suits the | 43 | Clients MAY verify that events returned by a relay match the specified query in a way that suits the |
| 42 | client's use case, and MAY stop querying relays that have low precision. | 44 | client's use case, and MAY stop querying relays that have low precision. |
| 43 | 45 | ||
| 44 | Relays SHOULD exclude spam from search results by default if they supports some form of spam filtering. | 46 | Relays SHOULD exclude spam from search results by default if they support some form of spam filtering. |
| 45 | 47 | ||
| 46 | ## Extensions | 48 | ## Extensions |
| 47 | 49 | ||
| 48 | Relay MAY support these extensions: | 50 | Relay MAY support these extensions: |
| 49 | - `include:spam` - turn off spam filtering, if it was enabled by default | 51 | - `include:spam` - turn off spam filtering, if it was enabled by default |
| 52 | - `domain:<domain>` - include only events from users whose valid nip05 domain matches the domain | ||
| 53 | - `language:<two letter ISO 639-1 language code>` - include only events of a specified language | ||
| 54 | - `sentiment:<negative/neutral/positive>` - include only events of a specific sentiment | ||
| 55 | - `nsfw:<true/false>` - include or exclude nsfw events (default: true) | ||