lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Lester <a...@petdance.com>
Subject Re: Perl Solr help - doing *:* query
Date Tue, 09 Jul 2013 20:02:29 GMT

On Jul 9, 2013, at 2:48 PM, Shawn Heisey <solr@elyograg.org> 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?


> http://apaste.info/3j3Q

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";


xoa

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


Mime
View raw message