Search::OpenSearch - provide search results in OpenSearch format


Search-OpenSearch documentation  | view source Contained in the Search-OpenSearch distribution.

Index


NAME

Top

Search::OpenSearch - provide search results in OpenSearch format

SYNOPSIS

Top

 use Search::OpenSearch;
 my $engine = Search::OpenSearch->engine(
    type    => 'KSx',
    index   => [qw( path/to/index1 path/to/index2 )],
    facets  => {
        names       => [qw( color size flavor )],
        sample_size => 10_000,
    },
    fields  => [qw( color size flavor )],
 );
 my $response = $engine->search(
    q           => 'quick brown fox',   # query
    s           => 'rank desc',         # sort order
    o           => 0,                   # offset
    p           => 25,                  # page size
    h           => 1,                   # highlight query terms in results
    c           => 0,                   # count total only (same as f=0 r=0)
    L           => 'field|low|high',    # limit results to inclusive range
    f           => 1,                   # include facets
    r           => 1,                   # include results
    format      => 'XML',               # or JSON
    b           => 'AND',               # or OR
 );
 print $response;

DESCRIPTION

Top

This module is a work-in-progress. The API is subject to change.

Search::OpenSearch is a framework for various backend engines to return results comforming to the OpenSearch API (http://opensearch.org/).

METHODS

Top

engine( args )

Returns a new Search::OpenSearch::Engine instance.

AUTHOR

Top

Peter Karman, <karman at cpan.org>

BUGS

Top

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

SUPPORT

Top

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

    perldoc Search::OpenSearch




You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Search-OpenSearch

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Search-OpenSearch

* CPAN Ratings

http://cpanratings.perl.org/d/Search-OpenSearch

* Search CPAN

http://search.cpan.org/dist/Search-OpenSearch/

COPYRIGHT & LICENSE

Top


Search-OpenSearch documentation  | view source Contained in the Search-OpenSearch distribution.