]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Isearch.pm
imap+nntp: share COMPRESS implementation
[public-inbox.git] / lib / PublicInbox / Isearch.pm
index 7ca2f9e414eac3e63a60e8ef8bdf03a54ef5ccd9..df940e76156d0f162d179f99352e4f7091ba6cc4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # Provides everything the PublicInbox::Search object does;
@@ -25,6 +25,7 @@ SELECT ibx_id FROM inboxes WHERE eidx_key = ? LIMIT 1
                die "E: `$self->{eidx_key}' not in $self->{es}->{topdir}\n";
 }
 
+sub query_approxidate { $_[0]->{es}->query_approxidate($_[1], $_[2]) }
 
 sub mset {
        my ($self, $str, $opt) = @_;
@@ -33,7 +34,7 @@ sub mset {
        if (my $uid_range = $opt{uid_range}) {
                my ($beg, $end) = @$uid_range;
                my $ibx_id = $self->{-ibx_id} //= _ibx_id($self);
-               my $dbh = $self->{es}->{over}->dbh;
+               my $dbh = $self->{es}->over->dbh;
                my $sth = $dbh->prepare_cached(<<'', undef, 1);
 SELECT MIN(docid) FROM xref3 WHERE ibx_id = ? AND xnum >= ? AND xnum <= ?