rmuir commented on a change in pull request #485:
URL: https://github.com/apache/lucene/pull/485#discussion_r758820290



##########
File path: lucene/core/src/java/org/apache/lucene/search/AutomatonQuery.java
##########
@@ -65,7 +63,7 @@
    * @param automaton Automaton to run, terms that are accepted are considered 
a match.
    */
   public AutomatonQuery(final Term term, Automaton automaton) {

Review comment:
       Well, `AutomatonQuery`, `CompiledAutomaton`, `RunAutomaton` is all 
low-level stuff. The number of users touching this stuff is low. We can 
mitigate any risks by documenting the change in `MIGRATE.txt`, etc.
   
   Instead most users interact with subclasses (e.g. `PrefixQuery`, 
`WildcardQuery`, `TermRangeQuery`, `FuzzyQuery`, `RegexpQuery`) ...
   
   I think if `Automaton` is to support both DFA and NFA, then it should simply 
call `automaton.isDeterministic()` to figure out what to do. Let the subclass 
control that, e.g. such flags could instead be on `RegexpQuery` maybe, or we 
could make a different subclass (depending on how we decide). Special Flags are 
senseless for a lot of these queries such as `TermRangeQuery` which always make 
a DFA.




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

Reply via email to