@Override protected BytesRef nextSeekTerm(final BytesRef term) throws IOException { //System.out.println("ATE.nextSeekTerm term=" + term); if (term == null) { assert seekBytesRef.length() == 0; // return the empty term, as it's valid if (runAutomaton.isAccept(0)) { return seekBytesRef.get(); } } else { seekBytesRef.copyBytes(term); } // seek to the next possible string; if (nextString()) { return seekBytesRef.get(); // reposition } else { return null; // no more possible strings can match } }
if (runAutomaton.isAccept(state)) { output.clear(); return output.get(); if (nextState != -1 && runAutomaton.isAccept(nextState)) { int numTransitions = automaton.getNumTransitions(state); if (numTransitions == 0) { assert runAutomaton.isAccept(state); output.setLength(idx); if (runAutomaton.isAccept(state)) { output.setLength(idx);
if (numTransitions == 0) { assert runAutomaton.isAccept(state); term.setLength(idx);
while (visited[state] != curGen && !runAutomaton.isAccept(state)) { visited[state] = curGen;
return false; final int newState = runAutomaton.step(savedStates.intAt(pos), seekBytesRef.byteAt(pos) & 0xff); if (newState >= 0 && runAutomaton.isAccept(newState))
boolean isAccept(Frame frame) { // reach a term both fst&fsa accepts return fsa.isAccept(frame.fsaState) && frame.fstArc.isFinal(); } boolean isValid(Frame frame) { // reach a prefix both fst&fsa won't reject
boolean isAccept(Frame frame) { // reach a term both fst&fsa accepts return fsa.isAccept(frame.state) && frame.arc.isFinal(); } boolean isValid(Frame frame) { // reach a prefix both fst&fsa won't reject
@Override protected BytesRef nextSeekTerm(final BytesRef term) throws IOException { //System.out.println("ATE.nextSeekTerm term=" + term); if (term == null) { assert seekBytesRef.length() == 0; // return the empty term, as it's valid if (runAutomaton.isAccept(0)) { return seekBytesRef.get(); } } else { seekBytesRef.copyBytes(term); } // seek to the next possible string; if (nextString()) { return seekBytesRef.get(); // reposition } else { return null; // no more possible strings can match } }
if (runAutomaton.isAccept(state)) { output.clear(); return output.get(); if (nextState != -1 && runAutomaton.isAccept(nextState)) { int numTransitions = automaton.getNumTransitions(state); if (numTransitions == 0) { assert runAutomaton.isAccept(state); output.setLength(idx); if (runAutomaton.isAccept(state)) { output.setLength(idx);
@Override protected BytesRef nextSeekTerm(final BytesRef term) throws IOException { //System.out.println("ATE.nextSeekTerm term=" + term); if (term == null) { assert seekBytesRef.length() == 0; // return the empty term, as it's valid if (runAutomaton.isAccept(runAutomaton.getInitialState())) { return seekBytesRef.get(); } } else { seekBytesRef.copyBytes(term); } // seek to the next possible string; if (nextString()) { return seekBytesRef.get(); // reposition } else { return null; // no more possible strings can match } }
@Override protected BytesRef nextSeekTerm(final BytesRef term) throws IOException { //System.out.println("ATE.nextSeekTerm term=" + term); if (term == null) { assert seekBytesRef.length() == 0; // return the empty term, as it's valid if (runAutomaton.isAccept(runAutomaton.getInitialState())) { return seekBytesRef.get(); } } else { seekBytesRef.copyBytes(term); } // seek to the next possible string; if (nextString()) { return seekBytesRef.get(); // reposition } else { return null; // no more possible strings can match } }
if (numTransitions == 0) { assert runAutomaton.isAccept(state); term.setLength(idx);
if (numTransitions == 0) { assert runAutomaton.isAccept(state); term.setLength(idx);
if (numTransitions == 0) { assert runAutomaton.isAccept(state); term.setLength(idx);
while (visited[state] != curGen && !runAutomaton.isAccept(state)) { visited[state] = curGen;
while (visited[state] != curGen && !runAutomaton.isAccept(state)) { visited[state] = curGen;
while (visited[state] != curGen && !runAutomaton.isAccept(state)) { visited[state] = curGen;
return false; final int newState = runAutomaton.step(savedStates.intAt(pos), seekBytesRef.byteAt(pos) & 0xff); if (newState >= 0 && runAutomaton.isAccept(newState))
return false; final int newState = runAutomaton.step(savedStates.intAt(pos), seekBytesRef.byteAt(pos) & 0xff); if (newState >= 0 && runAutomaton.isAccept(newState))
return false; final int newState = runAutomaton.step(savedStates.intAt(pos), seekBytesRef.byteAt(pos) & 0xff); if (newState >= 0 && runAutomaton.isAccept(newState))