From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS20473 45.76.80.0/20 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from mail.smrk.net (mail.smrk.net [45.76.87.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 31E761F461 for ; Mon, 16 Oct 2023 11:33:12 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=smrk.net header.i=@smrk.net header.a=rsa-sha256 header.s=20221002 header.b=oyEAEszY; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smrk.net; s=20221002; t=1697455976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LPDxEg7ggsanhMiAiX5BMYsmMk+NBomgpW2QHm1DghE=; b=oyEAEszYVI4H2X/GXKYAh+bWG8S230UB3se3bsbc7gMUiTscwddGayy71PiWiPbI7EzNia A7nfctTjliNq3FZr7nIiTIocYnKAMD+yi4slpSCAgZKdYtH4YhSEWj5zuu+I+ulyctWwIe bhRRyzx86kswAnIOXEMd6rSiRhdQRBRZRh+dEkiUDgby5eFtFhVMke0u4WlV0kjAS9bPbG rMjs3NPWM2E7iIMMENg9wHgmaQojAqhP02X+I3amvUKSlGCa9By9C6+kHA0/SvO8DyzBAY PfVOS5DIcbWok8m9EOLQBBUcZtVxgqk9UEOJn9iRz2U54WcsiYQMjT2sqLStmQ== Received: from localhost ( [192.168.5.2]) by smrk (OpenSMTPD) with ESMTPSA id 4df4d075 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 16 Oct 2023 13:32:56 +0200 (CEST) From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= To: meta@public-inbox.org Subject: [PATCH 3/3] search: rectify comment (rt: documented since 738c4a65719e) Date: Mon, 16 Oct 2023 13:33:04 +0200 Message-ID: <20231016113304.2788497-3-stepnem@smrk.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231016113304.2788497-1-stepnem@smrk.net> References: <20231016113304.2788497-1-stepnem@smrk.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Fixes: 738c4a65719e ("www: various help text updates") --- On a related note, there's this comment in LeiXSearch.pm:312: # this should really be rt: (received-time), but no stable # public-inbox releases support it, yet. my $dt = 'dt:'.strftime('%Y%m%d%H%M%S', gmtime($lr)).'..'; So I went all "hey, it's been 3 releases with rt:, let's do this", and suddenly, `lei up` stopped getting any updates :-] The problem is that the date syntax handling for d:, dt: and rt: is not the same (date_parse_prepare in Search.pm), which doesn't seem ideal to me, either, but maybe that's intentional/necessary? On a totally unrelated note, this patch is a nice example of how --diff-algorithm=histogram (which I use by default) sometimes produces diffs that are both longer and more confusing than with any other (git-provided) algorithm: our $ENQ_ASCENDING = 1; our @MAIL_VMAP = ( [ YYYYMMDD, 'd:'], - [ DT, 'dt:' ], - # these are undocumented for WWW, but lei and IMAP use them - [ BYTES, 'z:' ], [ TS, 'rt:' ], + # these are undocumented for WWW, but lei and IMAP use them + [ DT, 'dt:' ], + [ BYTES, 'z:' ], [ UID, 'uid:' ] ); our @MAIL_NRP; lib/PublicInbox/Search.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index d7a6f9d7913c..477f77dcffeb 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -68,10 +68,10 @@ our $ENQ_DESCENDING = 0; our $ENQ_ASCENDING = 1; our @MAIL_VMAP = ( [ YYYYMMDD, 'd:'], - [ DT, 'dt:' ], + [ TS, 'rt:' ], # these are undocumented for WWW, but lei and IMAP use them + [ DT, 'dt:' ], [ BYTES, 'z:' ], - [ TS, 'rt:' ], [ UID, 'uid:' ] ); our @MAIL_NRP; -- 2.42.0