.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "WebService::Solr::Response 3pm" .TH WebService::Solr::Response 3pm "2022-10-16" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" WebService::Solr::Response \- Parse responses from Solr .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& my $res = WebService::Solr::Response\->new( $http_res ); \& for my $doc( $res\->docs ) { \& print $doc\->value_for( \*(Aqid\*(Aq), "\en"; \& } \& my $pager = $res\->pager; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" 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. .SH "ACCESSORS" .IX Header "ACCESSORS" .IP "\(bu" 4 raw_response \- the raw HTTP::Response object. .IP "\(bu" 4 content \- a hashref of deserialized \s-1JSON\s0 data from the response. .IP "\(bu" 4 docs \- an array of WebService::Solr::Document objects. .IP "\(bu" 4 pager \- a Data::Page object for the search results. .IP "\(bu" 4 pageset \- a Data::Pageset object for the search results. Takes the same arguments as \f(CW\*(C`Data::Pageset\->new\*(C'\fR does. All arguments optional. .SH "METHODS" .IX Header "METHODS" .ie n .SS "new( $response )" .el .SS "new( \f(CW$response\fP )" .IX Subsection "new( $response )" Given an HTTP::Response object, it will parse the returned data as required. .ie n .SS "\s-1BUILDARGS\s0( @args )" .el .SS "\s-1BUILDARGS\s0( \f(CW@args\fP )" .IX Subsection "BUILDARGS( @args )" A Moo override to allow our custom constructor. .SS "facet_counts( )" .IX Subsection "facet_counts( )" A shortcut to the \f(CW\*(C`facet_counts\*(C'\fR key in the response data. .SS "spellcheck( )" .IX Subsection "spellcheck( )" A shortcut to the \f(CW\*(C`spellcheck\*(C'\fR key in the response data. .SS "solr_status( )" .IX Subsection "solr_status( )" Looks for the status value in the response data. .SS "ok( )" .IX Subsection "ok( )" Calls \f(CW\*(C`solr_status()\*(C'\fR and check that it is equal to 0. .SH "AUTHORS" .IX Header "AUTHORS" Andy Lester \f(CW\*(C`andy@petdance.com\*(C'\fR .PP Brian Cassidy .PP Kirk Beers .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2008\-2014 National Adult Literacy Database Copyright 2015\-2020 Andy Lester .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.