vismaytiwari commented on PR #16382: URL: https://github.com/apache/lucene/pull/16382#issuecomment-4946544945
@uschindler I like it — pushed into the automaton layer that'd also catch regex `.*.*`, not just wildcard `**`. One wrinkle: dropping a segment is only safe when it's the total automaton (`Σ*·Σ* = Σ*`), and detecting that mid-`concatenate` isn't free — `makeAnyString()` is a fresh instance each call and `isTotal` wants a minimized automaton, so it'd be a scan on the hot path. I'd keep it intent-driven instead: a small helper the builders call to skip an anyString when the previous segment was already one, reused in the regex builder. Same win, no per-query cost, and it drops the boolean you flagged. Want me to try that here, or keep it separate so this one can land? -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
