lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Resolved) (JIRA)" <>
Subject [jira] [Resolved] (SOLR-3315) SOLR ignores 'NOT' clause in query
Date Thu, 05 Apr 2012 02:53:23 GMT


Hoss Man resolved SOLR-3315.

    Resolution: Not A Problem

this appears to be a missunderstanding about how the query parser works.

using parens creates a boolean query, and a boolean query containing only negative clauses
does not match anything by definition.  

any of the following should work equivalent what you are describing (returning all documents,
scoring documents with first name "bob" higher)...

firstname:bob -department:ninja
firstname:bob NOT department_t:ninja
firstname:bob OR (*:* -department:ninja)

if you have additional questions, please ask them on the solr-user@lucene mailing list, not
in Jira.
> SOLR ignores 'NOT' clause in query
> ----------------------------------
>                 Key: SOLR-3315
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.5
>         Environment: Windows, Java 7
>            Reporter: Tom Marsh
>            Priority: Critical
>              Labels: not, query
> We have a simple domain where
> FirstName_s:"Bob"
> returns 40 documents, and
> -Department_t:"Ninjas"
> returns all of the documents (we don't have a ninja department).
> We expected the query
> (FirstName_s:"Bob") OR (-Department_t:"Ninjas")
> to return all documents, however it only returned the original 40 documents.
> We have experimented with a couple of different orderings, tried using 'NOT' instead
of '-' all to no avail.
> Is this expected behavior? Perhaps more importantly, how do we get the behavior we expect?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message