msfroh commented on PR #16801:
URL: https://github.com/apache/lucene/pull/16801#issuecomment-6124947825

   > i wonder if it makes sense to go even simpler, just drive behavior by 
finite/infinite. We don't even need to compute it, see PR 
https://github.com/apache/lucene/pull/11813 for some details. Basically the 
queries pass the info already.
   
   For AutomatonQuery, it looks like we always pass `false` for `finite` (but 
we ignore that for the `NONE`/`SINGLE` compiled types).
   
   Instead, I decided to strip out the helper methods to find the term bounds 
and just keep the special cases, particularly the "term dictionary is small" 
case. 
   
   Talking w/ @romseygeek at Community over Code, he suggested that the top 
special cases (where we look at `compiled.type`) should be moved into the 
constructor and used to override the `RewriteMethod`. We could directly rewrite 
`NONE` to `MatchNoDocsQuery`, `ALL` to `FieldExistsQuery`, and `SINGLE` to 
`TermQuery`. That means taking `CompiledAutomaton` in the constructor, though, 
which is a bigger refactoring that (IMO) belongs in a separate PR.


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