Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Plucene::Search::IndexSearcher

Name Plucene::Search::IndexSearcher
Version
Located at /usr/share/perl5
File /usr/share/perl5/Plucene/Search/IndexSearcher.pm
Is Core No
Search CPAN for this module Plucene::Search::IndexSearcher
Documentation Plucene::Search::IndexSearcher
Module Details Plucene::Search::IndexSearcher

NAME

Plucene::Search::IndexSearcher - The index searcher


SYNOPSIS

        # isa Plucene::Search::Searcher
        my $searcher = Plucene::Search::IndexSearcher
                ->new(Plucene::Index::Reader $reader);
        my Plucene::Index::Reader $reader = $searcher->reader;
        my         Plucene::Document $doc = $reader->doc($id);
        $searcher->close;

=head1 DESCRIPTION

Search over an IndexReader


METHODS

new

        my $searcher = Plucene::Search::IndexSearcher
                ->new(Plucene::Index::Reader $reader);

This will create a new Searcher object with the passed Plucene::Index::Reader or subclass thereof.


=cut

sub new { my ($self, $thing) = @_; if (not ref $thing and -d $thing) { $thing = Plucene::Index::Reader->open($thing); } croak ``Don't know how to turn $thing into an index reader'' unless UNIVERSAL::isa($thing, ``Plucene::Index::Reader''); bless { reader => $thing }, $self; }

reader

        my Plucene::Index::Reader $reader = $searcher->reader;

This will return the reader this searcher was made with.

search_top

The top search results.

doc

        my Plucene::Document $doc = $reader->doc($id);

This will return the Plucene::Document $id.

doc_freq / max_doc

get / set these

close

This will close the reader(s) associated with the searcher.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026