On Jul 9, 2013, at 2:48 PM, Shawn Heisey wrote:

This is primarily to Andy Lester, who wrote the WebService::Solr module
on CPAN, but I'll take a response from anyone who knows what I can do.

If I use the following Perl code, I get an error.
What error do you get? Never say "I get an error." Always say "I get this error: ________."
If I try to build
some other query besides *:* to request all documents, the script runs,
but the query doesn't do what I asked it to do.
What DOES it do?

For the sake of future readers, please put your code in the message. This message will get archived, and future people reading the lists will not be able to read the code at some arbitrary paste site.

Shawn's code is:

use strict;
use WebService::Solr;
use WebService::Solr::Query;
use WebService::Solr::Response;

my $url = "http://idx.REDACTED.com:8984/solr/ncmain";
my $solr = WebService::Solr->new($url);
my $query = WebService::Solr::Query->new("*:*");
my $response = $solr->search($query, {'rows' => '0'});
my $numFound = $response->content->{response}->{numFound};

print "nf: $numFound\n";


Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
groupsolr-user @
postedJul 9, '13 at 7:49p
activeJul 9, '13 at 8:55p

2 users in discussion

Shawn Heisey: 2 posts Andy Lester: 1 post



site design / logo © 2019 Grokbase