WebService::Lucene::Results - Results from a search or list operation


WebService-Lucene documentation  | view source Contained in the WebService-Lucene distribution.

Index


NAME

Top

WebService::Lucene::Results - Results from a search or list operation

SYNOPSIS

Top

    # documents
    @docs = $results->documents;

    # iterator
    $docs = $results->documents;

    # Data::Page object
    $pager = $results->pager;

    # next page
    $results = $results->next_page;

    # previous page
    $results = $results->previous_page;

DESCRIPTION

Top

Wraps a list of documents and a Data::Page object.

METHODS

Top

new( )

Creates an empty results object.

new_from_feed( $feed )

Generates a results object from an XML::Atom::Feed object.

new_from_opensearch( $opensearch )

Generates a results object from an WWW::OpenSearch::Response object.

object( [$object] )

Accessor for the original results object.

pager( [$pager] )

Accessor for the Data::Page object.

documents_ref( [$documents] )

Accessor for an array ref of documents.

documents( )

Returns an interator in scalar context or an array of documents in list context.

next_page( )

Goes to the next page of results.

previous_page( )

Goes to the previous page of results.

suggestion

Returns the opensearch:Query field with rel="correction" if it exists. In list context, returns the full list. In scalar context only the first suggestion is returned.

suggestions

Alias for suggestion().

_fetch( $url )

Attempts to get an Atom feed from $url and send it to new_from_feed.

AUTHORS

Top

* Brian Cassidy <brian.cassidy@nald.ca>
* Adam Paynter <adam.paynter@nald.ca>

COPYRIGHT AND LICENSE

Top


WebService-Lucene documentation  | view source Contained in the WebService-Lucene distribution.