NAME

Search::OpenSearch::Federated - aggregate OpenSearch results

SYNOPSIS

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";
}

DESCRIPTION

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.

METHODS

Search::OpenSearch::Federated isa Search::Tools::Object.

new( args )

Constructor. args should include key urls with value of an array reference. Supported args keys are:

urls arrayref
timeout n
fields arrayref
debug 0|1
normalize_scores 0|1

If true, all result scores are run through the Normalize module to (hopefully) help create parity amongst the result sets.

init

Internal initialization method. Overrides Search::Tools::Object->init.

Execute the search. Returns array ref of results sorted by score.

fields

Returns fields set in new().

total

Return total hits.

COPYRIGHT

Copyright 2013 - American Public Media Group

AUTHOR

Peter Karman, <karman at cpan.org>

BUGS

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.

SUPPORT

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

perldoc Search::OpenSearch::Federated

You can also look for information at:

ACKNOWLEDGEMENTS

Thanks to American Public Media and the state of Minnesota for sponsoring the development of this module.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.