On Tue, Nov 29, 2011 at 12:17:12PM +0200, goran kent wrote:
> I haven't ruled out something stupid on my part yet, but I've found
> that a query with a negate operator:
>
> [term1 -term2]
>
> or even
>
> [term1 -gobbledegoek-asdkjhdadakd823asdkb]
>
> when pumping through ClusterSearcher, always returns zero results. If
> using a standard PolySearcher on a local index, then it works as
> expected.
Can you please try the following for both ClusterSearcher and PolySearcher?
First, derive a query object from your query string. If you are using a
QueryParser, it's this...
my $query = $query_parser->parse("term1 -term2");
... otherwise, it's this:
my $query = $searcher->glean_query("term1 -term2");
Then let's examine the parsed queries to ensure that they are the same:
use Data::Dumper;
warn Dumper($query->dump);
If the parsed queries differ, that is probably because the Schema being fed to
ClusterSearcher's constructor is incomplete or wrong -- for instance, there
may be fields on the remote nodes that ClusterSearcher doesn't know about.
Currently, ClusterSearcher does not enforce schema completeness or
compatibility for its child nodes; that should be added in the future.
If the parsed queries are the same, there is presumably something amiss with
the search logic and we'll need to debug.
Marvin Humphrey