diff options
author | Eric Wong <e@80x24.org> | 2015-09-15 01:08:03 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-09-15 01:09:58 +0000 |
commit | dc7d90db1a7388bb3821add4ec208bfbfa25fdcf (patch) | |
tree | 35d3d85cc741c1d2013284144e609267af6f7263 /lib/PublicInbox/Search.pm | |
parent | 1d17f7848db5bacb0bc2f04637f461b683b24931 (diff) | |
download | public-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.pm | 9 |
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; |