You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/06/01 08:51:56 UTC

[GitHub] [lucene-solr] markharwood commented on pull request #1541: RegExp - add case insensitive matching option

markharwood commented on pull request #1541:
URL: https://github.com/apache/lucene-solr/pull/1541#issuecomment-636710038


   On reflection, you're right - the single flag is trappy.
   I'd like to refactor this class to make this simpler. The root problem we have is propagating parser state (flags/options) down to the objects that represent clauses in the parse tree. This is made difficult by the fact that RegExp is a single class representing both the parser and the parsed nodes.
   I suggest refactoring so that :
   1) RegExp remains the user-facing class with the public constructor and has the parsing logic
   2) We use a new private class RegExpClause to hold clause state, but being an inner class it has access to the flags in the outer RegExp instance that contains it.
   
   This should solve the problem of propagating settings and give us a sounder footing to build on.
   Should I do this refactor as part of this PR or another @jpountz ?
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org