]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
search: move find_doc_ids to searchidx
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index 446cfb0d50afd8be723a24c4f6f5751de80ba548..a234c8c32384264853b35bc6b476660c950cb89f 100644 (file)
@@ -389,6 +389,14 @@ sub add_message {
        $doc_id;
 }
 
+# returns begin and end PostingIterator
+sub find_doc_ids {
+       my ($self, $termval) = @_;
+       my $db = $self->{xdb};
+
+       ($db->postlist_begin($termval), $db->postlist_end($termval));
+}
+
 sub batch_do {
        my ($self, $termval, $cb) = @_;
        my $batch_size = 1000; # don't let @ids grow too large to avoid OOM