vismaytiwari commented on PR #16382:
URL: https://github.com/apache/lucene/pull/16382#issuecomment-4946776784

   @uschindler done — dropped the boolean in the wildcard loop; the `*` case 
now just checks `Operations.isTotal` on the previous segment, so it only 
appends anyString when the prior one wasn't already total. Pushed.
   
   On extending it to regex: both wildcard and regex actually flatten into the 
same `Operations.concatenate(List)`, so there is a shared spot — but I'd keep 
the dedup out of that generic method (it'd run an isTotal scan on every 
concatenate caller), and it wouldn't catch regex anyway since `.*` builds as 
`repeat(anyChar)`, not the canonical total form isTotal recognizes without 
determinizing first. Cleanest for regex is a small collapse of adjacent 
`.*`/anystring at the RegExp AST level — happy to do that as a follow-up so 
this PR stays focused. Sound ok?


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

Reply via email to