ChrisHegarty commented on issue #13706: URL: https://github.com/apache/lucene/issues/13706#issuecomment-2324861119
> In a similar vein, I wonder if `RegExp` could create more efficient automata out of the box. For instance, it looks like `Operations#repeat` could be optimized in the case when there is a single transition to directly create a minimal automaton, and this would in-turn make `RegExp(".*")` create an automaton that returns `true` for `Operations#isTotal`. I had a similar thought. Looking at the code it kinda looks a little tacky, but also kinda makes sone sense, e.g. ```diff case REGEXP_REPEAT: + if (exp1.kind == Kind.REGEXP_ANYCHAR && automaton_provider == null) { + return Automata.makeAnyString(); + } else { a = Operations.repeat(exp1.toAutomaton(automata, automaton_provider)); + } break; ```` -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org