[bug#60410,5/7] messages: Offload limiting search results to xapian.
Commit Message
* mumi/messages.scm (search-bugs): Offload limiting search results to
max to xapian.
---
mumi/messages.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
@@ -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."