NAME
WebService::Lucene::Results - Results from a search or list operation
SYNOPSIS
# 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
Wraps a list of documents and a Data::Page object.
METHODS
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()
.
_get_link( $type )
Attempts to get a link tag of type $type
from an Atom feed.
_fetch( $url )
Attempts to get an Atom feed from $url
and send it to new_from_feed
.
AUTHORS
Brian Cassidy <brian.cassidy@nald.ca>
Adam Paynter <adam.paynter@nald.ca>
COPYRIGHT AND LICENSE
Copyright 2006-2009 National Adult Literacy Database
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.