GNU bug report logs - #60410
[PATCH 0/7] mumi: Boolean prefixes in xapian indexing and others

Previous Next

Package: mumi;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Thu, 29 Dec 2022 20:19:02 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 60410 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 60410 <at> debbugs.gnu.org,
	Ricardo Wurmus <rekado <at> elephly.net>
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH 5/7] messages: Offload limiting search results to xapian.
Date: Thu, 29 Dec 2022 20:23:58 +0000
* mumi/messages.scm (search-bugs): Offload limiting search results to
max to xapian.
---
 mumi/messages.scm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mumi/messages.scm b/mumi/messages.scm
index 75ac3b1..b3ae962 100644
--- a/mumi/messages.scm
+++ b/mumi/messages.scm
@@ -252,10 +252,8 @@ PATCH-SET.  If PATCH-SET is not provided, return all patches."
 
 (define* (search-bugs query #:key (max 400))
   "Return a list of all bugs matching the given QUERY string."
-  (let ((ids (map string->number
-                  (search query))))
-    (status-with-cache (if (> (length ids) max)
-                           (take ids max) ids))))
+  (status-with-cache (map string->number
+                          (search query #:pagesize max))))
 
 (define (recent-bugs amount)
   "Return up to AMOUNT bugs with most recent activity."
-- 
2.38.1





This bug report was last modified 1 year and 118 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.