From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 67E711F4B4; Tue, 13 Apr 2021 11:25:18 +0000 (UTC) Date: Tue, 13 Apr 2021 11:25:18 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH 4/5] lei q: start wiring up saved search Message-ID: <20210413112518.GA7400@dcvr> References: <20210413105446.7245-1-e@80x24.org> <20210413105446.7245-5-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210413105446.7245-5-e@80x24.org> List-Id: Eric Wong wrote: > --- a/lib/PublicInbox/LeiXSearch.pm > +++ b/lib/PublicInbox/LeiXSearch.pm > @@ -149,22 +149,38 @@ sub query_one_mset { # for --threads and l2m w/o sort > local $0 = "$0 query_one_mset"; > my $lei = $self->{lei}; > my ($srch, $over) = ($ibxish->search, $ibxish->over); > - my $desc = $ibxish->{inboxdir} // $ibxish->{topdir}; > - return warn("$desc not indexed by Xapian\n") unless ($srch && $over); > - my $mo = { %{$lei->{mset_opt}} }; > + my $dir = $ibxish->{inboxdir} // $ibxish->{topdir}; > + return warn("$dir not indexed by Xapian\n") unless ($srch && $over); > + my $mo = { %{$lei->{mset_opt}} }; # copy > my $mset; > my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei); > my $can_kw = !!$ibxish->can('msg_keywords'); > my $threads = $lei->{opt}->{threads} // 0; > my $fl = $threads > 1 ? 1 : undef; > + my $lss = $lei->{dedupe}; > + $lss = undef unless $lss && $lss->can('cfg_set'); # saved search > + my $maxk = "external.$dir.maxnum"; Eh, that should probably be "maxuid" since "num" is more strongly associated with "NNTP article number". extindex may only be easily exposed via IMAP and HTTP (since we Message-IDs may conflict with different list trailers).