NightOwl888 commented on issue #400:
URL: https://github.com/apache/lucenenet/issues/400#issuecomment-757500075


   The [Query Syntax 
Documentation](https://lucenenet.apache.org/docs/4.8.0-beta00013/api/queryparser/Lucene.Net.QueryParsers.Classic.html#classes)
 states:
   
   > ### ParseException
   >
   > This exception is thrown when parse errors are encountered. You can 
explicitly create objects of this exception type by calling the method 
`GenerateParseException` in the generated parser.
   >
   > You can modify this class to customize your error reporting mechanisms so 
long as you retain the public fields.
   
   It is expected behavior for a malformed query to throw an exception, as this 
is a line-by-line port from Java.
   
   That said, in .NET it would be ideal if we had a `TryParse()` method that 
returned a boolean and an error message, but that would need to be done 
consistently on all of the Query Parsers, not just the Classic one. There are 
other things to consider redesigning, such as culture and other configuration 
as parameters of `Parse()/TryParse()` instead of public properties. However, I 
am not sure if any of that will make it into the 4.8.0 release.
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to