From cfcc2e48cd3555e9e458a32f816e0d1ea4994a40 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 7 Jun 2024 10:47:58 -0400 Subject: [PATCH 1/2] Defines the order of the results for NIP-50 --- 50.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/50.md b/50.md index a6e02be9..f2b7b191 100644 --- a/50.md +++ b/50.md @@ -26,6 +26,9 @@ Relays SHOULD interpret the query to the best of their ability and return events 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. +Results SHOULD be returned in the order of their matching score, not by the usual `.created_at`. +The `limit` filter SHOULD be applied after sorting by matching score. + A query string may contain `key:value` pairs (two words separated by colon), these are extensions, relays SHOULD ignore extensions they don't support. From 61ed2716a812abda1c46ff59035b69099b7078b3 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 7 Jun 2024 11:53:06 -0400 Subject: [PATCH 2/2] Update 50.md Co-authored-by: hodlbod --- 50.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/50.md b/50.md index f2b7b191..2a31cb11 100644 --- a/50.md +++ b/50.md @@ -26,9 +26,8 @@ Relays SHOULD interpret the query to the best of their ability and return events 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. -Results SHOULD be returned in the order of their matching score, not by the usual `.created_at`. -The `limit` filter SHOULD be applied after sorting by matching score. - +Results SHOULD be returned in descending order by quality of search result (as defined by the implementation), +not by the usual `.created_at`. The `limit` filter SHOULD be applied after sorting by matching score. A query string may contain `key:value` pairs (two words separated by colon), these are extensions, relays SHOULD ignore extensions they don't support.