You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/11/29 23:42:59 UTC

[GitHub] [lucene] rmuir commented on a change in pull request #485: LUCENE-10010: don't determinize in CompiledAutomaton/RunAutomaton

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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org