[ 
https://issues.apache.org/jira/browse/LUCENE-9528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17197218#comment-17197218
 ] 

Dawid Weiss commented on LUCENE-9528:
-------------------------------------

I do have one question about syntax. We currently allow boost and fuzzy 
operators to come in any order:
{code}
term^3~2
{code}

The order above doesn't make any sense from parser grammar point of view (and 
is in fact coded incorrectly allowing two conflicting fuzzy operators). The 
boost applies to a sub-clause (be it regexp, term query, phrase query) and 
grammar-wise it shouldn't occur before the fuzzy operator.

I *can* implement this as it was but it makes parser grammar more difficult to 
read and is just plain unnatural (in my opinion). If there are no objections, 
I'd like to restrict query parsing to disallow the above ordering.

https://github.com/dweiss/lucene-solr/blob/LUCENE-9528/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.jj#L398-L426

> Clean up obsolete and commented-out cruft from StandardSyntaxParser.jj
> ----------------------------------------------------------------------
>
>                 Key: LUCENE-9528
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9528
>             Project: Lucene - Core
>          Issue Type: Sub-task
>            Reporter: Dawid Weiss
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The indentation in that file is crazy. So are micro-optimizations which make 
> reading the syntax parser much more difficult than it actually is.



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

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

Reply via email to