Andreas Presthammer created SOLR-11761:
------------------------------------------

             Summary: Query parsing with comments fail in 
org.apache.solr.parser.QueryParser
                 Key: SOLR-11761
                 URL: https://issues.apache.org/jira/browse/SOLR-11761
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: 6.6.2
         Environment: Java 1.8
            Reporter: Andreas Presthammer


Repro:

org.apache.solr.parser.QueryParser queryParser = ...
queryParser.parse("/* foo */ bar"); // works fine
queryParser.parse("/*"); // fails with SyntaxError, which is correct.
queryParser.parse("/* foo */ bar"); // Fails with SyntaxError. This is the bug
queryParser.parse("bar"); // works fine
queryParser.parse("/* foo */ bar"); // Still failing with SyntaxError

The last parse call will continue to fail for expressions containing comments. 
Only way to work around that I've found it to create a new instance of 
QueryParser.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to