Tony Bowden > Plucene-1.25 > Plucene::Search::IndexSearcher

Download:
Plucene-1.25.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  12
Open  5
View/Report Bugs
Source  

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;

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.

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.

syntax highlighting: