The following query works in the surround query parser (tested via solr):
However despite the Solr ref guide specifically noting that "NOT" is unary, the following throw parsing exceptions (also tested in solr):
additionally the right hand side of NOT requires parenthesis for fielded terms...
throws an exception whereas
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.