From patchwork Thu Dec 29 20:23:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 45697 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A582A27BBED; Thu, 29 Dec 2022 20:26:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 35B4727BBE9 for ; Thu, 29 Dec 2022 20:26:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAzSc-00074M-M4; Thu, 29 Dec 2022 15:25:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAzSa-000734-7a for guix-patches@gnu.org; Thu, 29 Dec 2022 15:25:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAzSZ-0005iS-P5 for guix-patches@gnu.org; Thu, 29 Dec 2022 15:25:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAzSZ-0007S2-KJ for guix-patches@gnu.org; Thu, 29 Dec 2022 15:25:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60410] [PATCH 5/7] messages: Offload limiting search results to xapian. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Dec 2022 20:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60410 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60410@debbugs.gnu.org, Ricardo Wurmus Cc: Arun Isaac Received: via spool by 60410-submit@debbugs.gnu.org id=B60410.167234545628533 (code B ref 60410); Thu, 29 Dec 2022 20:25:03 +0000 Received: (at 60410) by debbugs.gnu.org; 29 Dec 2022 20:24:16 +0000 Received: from localhost ([127.0.0.1]:33003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAzRo-0007Q3-Hc for submit@debbugs.gnu.org; Thu, 29 Dec 2022 15:24:16 -0500 Received: from mugam.systemreboot.net ([139.59.75.54]:60044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAzRl-0007PR-L5 for 60410@debbugs.gnu.org; Thu, 29 Dec 2022 15:24:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0/34m44bo463M8Ul6nn3IOJp6V5ulLwe1K1pRmSm4TE=; b=d/+UBmz/e0BeZmfHE5Q1cJracs /fuz4Zqf7tHt7FzvMc3G3CSq9kAtbxULW15QgOizEGiJ9d4D00QpjYLESjdDGNGtWTdkCRu4c2GP/ oN1a1hnTCOrWO6oS5tFsUeuK1FbTJvH0esc8QNQzOajTzvU0Ce/L9Ol+7cAEPl1Yyq1e1xBizwpU6 dd4IHJv8QroF5MlSLToZU2rqXRtIHyYpo0UQ7nikFQXWedOEKvcfdl8r5li6RWy/d1pnSJM3gB4tb 6RomkKethHeCxSIA/WLlCD+uQbnbRdgzTavVRqDt1LehM8UROSafkVC2QG2x9iRCKwurBEfsYDapI RyMVl+CA==; Received: from [192.168.2.1] (port=38338 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pAzRj-000oIe-1x; Fri, 30 Dec 2022 01:54:12 +0530 From: Arun Isaac Date: Thu, 29 Dec 2022 20:23:58 +0000 Message-Id: <20221229202400.28565-5-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221229201809.27997-1-arunisaac@systemreboot.net> References: <20221229201809.27997-1-arunisaac@systemreboot.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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."