]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Config.pm
isearch: emulate per-inbox search with ->ALL
[public-inbox.git] / lib / PublicInbox / Config.pm
index 9b9d5c1916d2f0b8f6dfa42260f3cb03f6e2e716..1844f8b24132152becfd2cf695c76c2ae0d98a5f 100644 (file)
@@ -33,6 +33,7 @@ sub new {
        $self->{-by_list_id} = {};
        $self->{-by_name} = {};
        $self->{-by_newsgroup} = {};
+       $self->{-by_eidx_key} = {};
        $self->{-no_obfuscate} = {};
        $self->{-limiters} = {};
        $self->{-code_repos} = {}; # nick => PublicInbox::Git object
@@ -476,8 +477,11 @@ EOF
                        push @$repo_objs, $repo if $repo;
                }
        }
-
-       $ibx
+       if (my $es = ALL($self)) {
+               require PublicInbox::Isearch;
+               $ibx->{isrch} = PublicInbox::Isearch->new($ibx, $es);
+       }
+       $self->{-by_eidx_key}->{$ibx->eidx_key} = $ibx;
 }
 
 sub _fill_ei ($$) {