logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

KinoSearch1::Search::MultiSearcher - Aggregate results from multiple searchers.

Description

       Aside from the arguments to its constructor, MultiSearcher looks and acts just like a
       KinoSearch1::Searcher object.

       The primary use for MultiSearcher is to aggregate results from several remote searchers via SearchClient,
       diffusing the cost of searching a large corpus over multiple machines.

License, Disclaimer, Bugs, Etc.

       See KinoSearch1 version 1.01.

perl v5.40.0                                       2024-10-20             KinoSearch1::Se...::MultiSearcher(3pm)

Methods

new
       Constructor.  Takes two hash-style parameters, both of which are required.

       •   analyzer - an item which subclasses KinoSearch1::Analysis::Analyzer.

       •   searchables - a reference to an array of searchers.

Name

       KinoSearch1::Search::MultiSearcher - Aggregate results from multiple searchers.

Synopsis

           for my $server_name (@server_names) {
               push @searchers, KinoSearch1::Search::SearchClient->new(
                   peer_address => "$server_name:$port",
                   analyzer     => $analyzer,
                   password     => $pass,
               );
           }
           my $multi_searcher = KinoSearch1::Search::MultiSearcher->new(
               searchables => \@searchers,
               analyzer    => $analyzer,
           );
           my $hits = $multi_searcher->search( query => $query );

See Also