vsop-479 commented on code in PR #13072:
URL: https://github.com/apache/lucene/pull/13072#discussion_r1505621389


##########
lucene/core/src/java/org/apache/lucene/util/automaton/RunAutomaton.java:
##########
@@ -67,12 +68,16 @@ protected RunAutomaton(Automaton a, int alphabetSize) {
     points = a.getStartPoints();
     size = Math.max(1, a.getNumStates());
     accept = new FixedBitSet(size);
+    terminable = new FixedBitSet(size);

Review Comment:
   > we could solely store it in RunAutomaton, if we can efficiently find final 
states that effectively have .* transitions to themselves?
   
   I will try it.
   
   Actually, I judged wether `Automaton` can match all suffixes from accept 
states in my first commit like this:
   ````
    if (runAutomaton.isAccept(state) && automaton.getNumTransitions(state) == 
1) {
               Transition transition = new Transition();
               automaton.getTransition(state, 0, transition);
               if (transition.dest == state && transition.min == 0 && 
transition.max == 255) {
                 break;
    }
   ````
   But it only apply to `PrefixQuery`. It seems like that the `Automaton`'s 
accept state's `Transition` is split into many in `RegexpQuery`. I will try to 
find other way.



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