You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Gus Heck (Jira)" <ji...@apache.org> on 2019/10/16 05:32:00 UTC

[jira] [Updated] (LUCENE-9008) Surround Query Parser NOT operator is binary

     [ https://issues.apache.org/jira/browse/LUCENE-9008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gus Heck updated LUCENE-9008:
-----------------------------
    Summary: Surround Query Parser NOT operator is binary  (was: Surround Query Parser NOT operator is binary (sort of))

> Surround Query Parser NOT operator is binary
> --------------------------------------------
>
>                 Key: LUCENE-9008
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9008
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/queryparser
>    Affects Versions: 8.3
>            Reporter: Gus Heck
>            Priority: Major
>              Labels: documentation
>
> The following query works in the surround query parser (tested via solr):
> {code:java}
> foo NOT bar{code}
> However despite the Solr ref guide specifically noting that "NOT" is unary, the following throw parsing exceptions (also tested in solr):
> {code:java}
> foo AND NOT bar{code}
> {code:java}
> NOT bar AND foo{code}
> additionally the right hand side of NOT requires parenthesis for fielded terms...
> {code:java}
> fizz NOT game:buzz {code}
> throws an exception whereas
> {code:java}
> fizz NOT (game:buzz) {code}
> keeps the parser happy.
> The binary syntax may be intentional and certainly has a nice readability. The parenthesis around fielded stuff seems arbitrary and just irritating. However, this parser has been around for a long time so we probably won't want to go changing it fundamentally.
> I suggest that this ticket should provide some docs clarifying at least this surprising syntax in the lucene package javadoc, the solr parser factory class javadocs and the solr ref guide docs ([https://lucene.apache.org/solr/guide/8_1/other-parsers.html]) should be corrected and expanded to at least clarify this surprising and quirky binary NOT syntax.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org