You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Andreas Presthammer (JIRA)" <ji...@apache.org> on 2017/12/14 12:24:00 UTC

[jira] [Created] (SOLR-11761) Query parsing with comments fail in org.apache.solr.parser.QueryParser

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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org