Dezi::Response - Dezi search server response
use Dezi::Client; my $client = Dezi::Client->new('http://localhost:5000'); my $response = $client->search( q => 'foo' ); # $response isa Dezi::Response # iterate over results for my $result (@{ $response->results }) { printf("--\n uri: %s\n title: %s\n score: %s\n", $result->uri, $result->title, $result->score); } # print stats printf(" hits: %d\n", $response->total); printf("search time: %s\n", $response->search_time); printf(" build time: %s\n", $response->build_time); printf(" query: %s\n", $response->query);
Dezi::Response represents a Dezi server response.
This class is used internally by Dezi::Client.
Returns a new response. http_response should be a HTTP::Response object from a Dezi JSON response.
Allows for single argument http_response instead of named pair.
Initializes objects.
Returns array ref of Dezi::Doc objects.
Returns integer of hit count.
Returns string of floating point time Dezi server took to search.
Returns string of floating point time Dezi server took to build response.
Returns the query string.
Returns array ref of field names.
Returns array ref of facet objects.
Facet objects are currently hashrefs. This may change in future.
Returns array ref of query suggestions.
Returns raw HTTP:Response object.
Peter Karman, <karman at cpan.org>
<karman at cpan.org>
Please report any bugs or feature requests to bug-dezi-client at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dezi-Client. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-dezi-client at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Dezi::Client
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dezi-Client
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Dezi-Client
CPAN Ratings
http://cpanratings.perl.org/d/Dezi-Client
Search CPAN
http://search.cpan.org/dist/Dezi-Client/
Copyright 2011 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.
To install Dezi::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dezi::Client
CPAN shell
perl -MCPAN -e shell install Dezi::Client
For more information on module installation, please visit the detailed CPAN module installation guide.