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.
engine
engine_config
stats_logger
http_allow
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:
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:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Search-OpenSearch-Server
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
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.