The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WebService::Solr::Response - Parse responses from Solr

SYNOPSIS

    my $res = WebService::Solr::Response->new( $http_res );
    for my $doc( $res->docs ) {
        print $doc->value_for( 'id'), "\n";
    }
    my $pager = $res->pager;

DESCRIPTION

This class encapsulates reponses from the Solr Web Service. Typically it is used when documents are returned from a search query, though it will accept all responses from the service.

ACCESSORS

METHODS

new( $response )

Given an HTTP::Response object, it will parse the returned data as required.

BUILDARGS( @args )

A Moose override to allow our custom constructor.

facet_counts( )

A shortcut to the facet_counts key in the response data.

solr_status( )

Looks for the status value in the respons data.

ok( )

Calls solr_status() and check that it is equal to 0.

AUTHORS

Brian Cassidy <bricas@cpan.org>

Kirk Beers <kirk.beers@nald.ca>

COPYRIGHT AND LICENSE

Copyright 2008 National Adult Literacy Database

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