Peter Karman > Search-OpenSearch-Server-0.26 > Search::OpenSearch::Server

Download:
Search-OpenSearch-Server-0.26.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.26   Source   Latest Release: Search-OpenSearch-Server-0.28

NAME ^

Search::OpenSearch::Server - serve OpenSearch results

DESCRIPTION ^

Search::OpenSearch::Server is an abstract base class with some basic methods defining server behavior.

METHODS ^

new ^

The Search::OpenSearch::Server abstract class does not implement a constructor. Each subclass must do that.

However, accessor/mutator methods are supported via Plack::Util::Accessor, and these should be set in the constructor.

do_search( request, response )

Performs a search using a Search::OpenSearch::Engine set in engine().

request

A Request object. Should act like a Plack::Request or a Catalyst::Request.

response

A Response object. Should act like a Plack::Response or a Catalyst::Response.

Will return the response object.

do_rest_api( request, response[, path] )

Calls the appropriate REST method on the engine().

request

A Request object. Should act like a Plack::Request or a Catalyst::Request.

response

A Response object. Should act like a Plack::Response or a Catalyst::Response.

Will return the response object.

The following HTTP headers are supported for explicitly setting the indexer behavior:

X-SOS-Content-Location
X-SOS-Last-Modified
X-SOS-Parser-Type
X-SOS-Content-Type
X-SOS-Encoding

handle_no_query( request, response )

If no 'q' param is present in the Plack::Request, this method is called. The default behavior is to set a 400 (bad request) with error message. You can override it to behave more kindly.

request

A Request object. Should act like a Plack::Request or a Catalyst::Request.

response

A Response object. Should act like a Plack::Response or a Catalyst::Response.

Will return the response object.

log( msg [, <level ] )

Utility method. Default is to warn(msg).

AUTHOR ^

Peter Karman, <karman at cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-search-opensearch-server at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Search-OpenSearch-Server. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Search::OpenSearch::Server

You can also look for information at:

COPYRIGHT & LICENSE ^

Copyright 2010 Peter Karman.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

syntax highlighting: