I just tried the master branch quickly, and I can't reproduce this.

    "params":{
      "q":"*:*",
      "debug":"true",
      "fq":"title_t:(NOT Kings)"}},
 [...]
    "QParser":"LuceneQParser",
    "filter_queries":["title_t:(NOT Kings)"],
    "parsed_filter_queries":["-title_t:kings"],

Knowing how the parser works for myfield:(stuff), this is expected (it just
sets the default field to myfield and then parses what's inside the parens
as normal.
So in my example above, all the following parse to the same expression:
-title_t:Kings
NOT title_t:Kings
title_t:(NOT Kings)

Handling pure negative queries currently works at a higher level in Solr
(not the query parser).

Try turning on debug=true and looking at the relevant part of what the
debug info returns.

-Yonik

On Thu, Sep 20, 2018 at 4:05 AM damian.pawski <dpaw...@gmail.com> wrote:

> Hi
> On the Solr 5.4.x below query works fine:
>    *
>       ....
>       "q": "*:*",
>       "_": "1537429094299",
>       "wt": "json",
>       "fq": "JobTitle:(NOT programmer)"
>       ...
>     *
>
> , however the same query returns 0 results (I have checked and index
> contains correct data) in the Solr 7.4.1.
>
> I couldn't find anything about this issue in the Solr upgrade pages.
>
> I have tried below query on Solr 7.4.1
>      *
>        ...
>        "q":"*:*",
>        "fq":"-JobTitle:programmer"
>        ...*
> and I am getting correct results.
>
> The problematic search  "JobTitle:(NOT programmer)" is constructed via C#
> code, so I can ont easily update to "-JobTitle".
>
>
> Why the *NOT* query stopped working in the Solr 7.4.1, is there any setting
> that I can switch on to make it work?
>
>
> Thank you
> Damian
>
>
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Reply via email to