vismaytiwari commented on PR #16382: URL: https://github.com/apache/lucene/pull/16382#issuecomment-4935554795
@rmuir fair point that *-spam isn't a real use case, and I don't want to add complexity for garbage input. But I think this one's worth it because it costs real queries nothing: the change is a single boolean flag in the parse loop, so for any pattern without consecutive unescaped * it builds the exact same automaton as before — identical work. The only path that changes is the degenerate one, where it goes from ~50M transitions (an OOM footgun, and a TooComplexToDeterminize crash on 10.x) to 1. It's really just collapsing ** → *, which are equivalent anyway. So: zero cost for everyone, removes a crash for the unlucky. Happy to make it leaner if you see a tidier way — but would that change your mind? -- 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]
