Subject: | Unable to query for all documents (*:*) |
Date: | Wed, 10 Jul 2013 10:40:30 -0600 |
To: | bug-WebService-Solr [...] rt.cpan.org |
From: | Shawn Heisey <solr [...] elyograg.org> |
I cannot figure out how to send a query for all documents. Using the
new method on the Query object with a value of *:* throws an error:
Code:
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'});
Error:
Can't locate object method "_struct_" via package
"WebService::Solr::Query" at
/usr/local/share/perl/5.14.2/WebService/Solr/Query.pm line 37.
The WebService-Solr module is installed from CPAN into the packaged perl
5.14.2 in debian wheezy. I got the same error when using debian's
packaged version of the WebService-Solr package.
Separate but related problem: I tried to do a range query on my
uniqueKey field of '[* TO *]' but the module escapes the special
characters and they become a literal search string rather than a Solr
range query. The query works, but returns zero results because there's
nothing in the index that matches.