From a3ad598c92039fae4a78354be9c33fff5328d7db Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 3 Sep 2021 08:54:26 +0000 Subject: lei_xsearch: avoid false-positives on externals w/ L: and kw: We need to use LeiSearch->qparse_new to handle (and filter out) "L:" and "kw:" search prefixes to avoid hitting false positives when externals are involved. Unfortunately, this doesn't work for remote HTTP(S) externals, but those aren't enabled by default. --- lib/PublicInbox/LeiXSearch.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/LeiXSearch.pm') diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index b9f0d692..b6d7bf2b 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -161,6 +161,7 @@ sub query_one_mset { # for --threads and l2m w/o sort my ($srch, $over) = ($ibxish->search, $ibxish->over); my $dir = $ibxish->{inboxdir} // $ibxish->{topdir}; return warn("$dir not indexed by Xapian\n") unless ($srch && $over); + bless $srch, 'PublicInbox::LeiSearch'; # for ->qparse_new my $mo = { %{$lei->{mset_opt}} }; # copy my $mset; my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei); -- cgit v1.2.3-24-ge0c7