WebService::Solr::Response(3pm)

WebService::Solr::Response3pm

Parse responses from solr

Usage

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

Overview

This class encapsulates responses 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

•

raw_response - the raw HTTP::Response object.

•

content - a hashref of deserialized JSON data from the response.

•

docs - an array of WebService::Solr::Document objects.

•

pager - a Data::Page object for the search results.

•

pageset - a Data::Pageset object for the search results. Takes the same arguments as "Data::Pageset->new" does. All arguments optional.

Methods

new( $response )

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

BUILDARGS( @args )

A Moo override to allow our custom constructor.

facet_counts( )

A shortcut to the "facet_counts" key in the response data.

spellcheck( )

A shortcut to the "spellcheck" key in the response data.

solr_status( )

Looks for the status value in the response data.

ok( )

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

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 6 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12–13

Authors

Andy Lester "[email protected]"

Brian Cassidy <[email protected]>

Kirk Beers

From libwebservice-solr-perl 0.44-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.