]> Sergey Matveev's repositories - public-inbox.git/commitdiff
search: move find_doc_ids to searchidx
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Thu, 29 Mar 2018 09:57:53 +0000 (09:57 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Thu, 29 Mar 2018 10:00:05 +0000 (10:00 +0000)
We do not need this subroutine for read-only use in Search.pm

lib/PublicInbox/Search.pm
lib/PublicInbox/SearchIdx.pm

index 7d42aaad40d45676e2601d32d52a4d5918856e8d..6f5e0624a4a5986369f12de95d81f6fe3a01fbf4 100644 (file)
@@ -403,14 +403,6 @@ sub each_smsg_by_mid {
        }
 }
 
-# returns begin and end PostingIterator
-sub find_doc_ids {
-       my ($self, $termval) = @_;
-       my $db = $self->{xdb};
-
-       ($db->postlist_begin($termval), $db->postlist_end($termval));
-}
-
 # normalize subjects so they are suitable as pathnames for URLs
 # XXX: consider for removal
 sub subject_path {
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