lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Hoerner <br...@bretthoerner.com>
Subject Re: Confusion about location of + and - ?
Date Tue, 01 Jul 2014 20:06:21 GMT
Interesting, is there a performance impact to sending the *:*?


On Tue, Jul 1, 2014 at 2:53 PM, Jack Krupansky <jack@basetechnology.com>
wrote:

> Yeah, there's a known bug that a negative-only query within parentheses
> doesn't match properly - you need to add a non-negative term, such as
> "*:*". For example:
>
>  text:(+"happy") AND user:(*:* -"123456789")
>
> -- Jack Krupansky
>
> -----Original Message----- From: Brett Hoerner
> Sent: Tuesday, July 1, 2014 2:51 PM
> To: solr-user@lucene.apache.org
> Subject: Confusion about location of + and - ?
>
>
> Can anyone explain the difference between these two queries?
>
>  text:(+"happy") AND -user:("123456789") = numFound 2912224
>
> But
>
>  text:(+"happy") AND user:(-"123456789") = numFound 0
>
> Now, you may just say "then just put - infront of your field, duh!" Well,
>
>  text:(+"happy") = numFound 2912224
>  user:(-"123456789") = numFound 465998192
>
> (FWIW there is no user named 123456789 in my index)
>
> As you can see, the queries work alone, but when combined with an AND I
> always get 0 results. If I move the - before the field in my query, it
> works. What am I missing here?
>
> Thanks.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message