about summary refs log tree commit homepage
path: root/lib/PublicInbox/Search.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-09-15 01:08:03 +0000
committerEric Wong <e@80x24.org>2015-09-15 01:09:58 +0000
commitdc7d90db1a7388bb3821add4ec208bfbfa25fdcf (patch)
tree35d3d85cc741c1d2013284144e609267af6f7263 /lib/PublicInbox/Search.pm
parent1d17f7848db5bacb0bc2f04637f461b683b24931 (diff)
downloadpublic-inbox-dc7d90db1a7388bb3821add4ec208bfbfa25fdcf.tar.gz
DBI + DBD::SQLite has much better handling of prefix lookups
than Xapian.  While we're at it, avoid linking blatantly wrong
Message-IDs to external services.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r--lib/PublicInbox/Search.pm9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index 2b33b395..a588af43 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -269,13 +269,4 @@ sub enquire {
         $self->{enquire} ||= Search::Xapian::Enquire->new($self->{xdb});
 }
 
-sub mid_prefix {
-        my ($self, $mpfx) = @_;
-        my $query = eval { $self->qp->parse_query("m:$mpfx", FLAG_PARTIAL) };
-        return if $@;
-        my $res = $self->do_enquire($query, { relevance => 1 });
-        return unless $res->{total};
-        [ map { $_->mid } @{$res->{msgs}} ];
-}
-
 1;