tommcdo opened a new issue, #723:
URL: https://github.com/apache/lucenenet/issues/723

   Part of my code is building a Lucene query to find a user by email. It looks 
roughly like this:
   
   ```csharp
   string query = $"email: {QueryParserBase.Escape(emailAddress)}";
   ```
   
   There was a case where the email address contained an `=` sign (e.g. 
`[email protected]`). With that input, my query resulted in a Syntax Error:
   
   > `Error! Invalid query: Syntax Error, cannot parse email: 
[email protected]:`
   
   After some testing, I found that I could fix it in two ways:
   
   1. Wrapping the email address in double quotes
   2. Escaping the equals sign, `\=`
   
   Upon further digging, I found that [`QueryParserBase.Escape` does not escape 
`=` 
signs](https://github.com/apache/lucenenet/blob/master/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs#L1072-L1074).
   
   Is there a reason `=` is omitted from that function?


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to