Search::OpenSearch::Federated - aggregate OpenSearch results
my $ms = Search::OpenSearch::Federated->new( urls => [ 'http://some-site.org/search?q=foo', 'http://some-other-site.org/search?q=foo', ], timeout => 10, # very generous ); my $results = $ms->search(); for my $r (@$results) { printf("title=%s", $r->title); printf("uri=%s", $r->uri); print "\n"; }
Search::OpenSearch::Federated is for aggregating multiple OpenSearch responses into a single result set. Use it as a client for Search::OpenSearch::Engine-powered servers or for any server that provides OpenSearch-style results.
Search::OpenSearch::Federated isa Search::Tools::Object.
Constructor. args should include key urls with value of an array reference. Supported args keys are:
urls
If true, all result scores are run through the Normalize module to (hopefully) help create parity amongst the result sets.
Defaults to $VERSION package var.
Execute the search. Returns array ref of results sorted by score.
Returns fields set in new().
Return total hits.
Returns hash ref of subtotal for each URL, keys being the values of urls().
Returns hash ref of aggregated facets for all URLs.
Copyright 2013 - American Public Media Group
Peter Karman, <karman at cpan.org>
<karman at cpan.org>
Please report any bugs or feature requests to bug-search-opensearch-federated at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Search-OpenSearch-Federated. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-search-opensearch-federated at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Search::OpenSearch::Federated
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Search-OpenSearch-Federated
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Search-OpenSearch-Federated
CPAN Ratings
http://cpanratings.perl.org/d/Search-OpenSearch-Federated
Search CPAN
http://search.cpan.org/dist/Search-OpenSearch-Federated/
Thanks to American Public Media and the state of Minnesota for sponsoring the development of this module.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Search::OpenSearch::Federated, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Search::OpenSearch::Federated
CPAN shell
perl -MCPAN -e shell install Search::OpenSearch::Federated
For more information on module installation, please visit the detailed CPAN module installation guide.