Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
6.2.1, 6.6.2, 8.0
-
None
-
None
-
Java 1.8
Reproduced issue on org.apache.solr:solr-core:6.2.1 and 6.6.2
Description
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.