You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jean-Sebastien Vachon <js...@videotron.ca> on 2010/08/11 22:28:48 UTC
bug or feature???
Hi,
Can someone tell me why the two following queries do not return the same results?
Is that a bug or a feature?
http://localhost:8983/jobs/select?fq=title:(NOT janitor)&fq=description:(NOT janitor)&q=*:*
http://localhost:8983/jobs/select?q=title:(NOT janitor) AND description:(NOT janitor)
The second query returns no result while the first one returns 6097276 documents
Thanks
Re: bug or feature???
Posted by Jan Høydahl / Cominvent <ja...@cominvent.com>.
Your syntax looks a bit funny.
Which version of Solr are you using? Pure negative queries are not supported, try q=(*:* -title:janitor) instead.
Also, for debugging what's going on, please add &debugQuery=true and share the parsed query for both cases with us.
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Training in Europe - www.solrtraining.com
On 11. aug. 2010, at 22.28, Jean-Sebastien Vachon wrote:
> Hi,
>
> Can someone tell me why the two following queries do not return the same results?
> Is that a bug or a feature?
>
> http://localhost:8983/jobs/select?fq=title:(NOT janitor)&fq=description:(NOT janitor)&q=*:*
>
> http://localhost:8983/jobs/select?q=title:(NOT janitor) AND description:(NOT janitor)
>
>
> The second query returns no result while the first one returns 6097276 documents
>
> Thanks