@Override public boolean seekExact(BytesRef text) throws IOException { //System.out.println("te.seekExact text=" + field.name + ":" + text.utf8ToString() + " this=" + this); current = fstEnum.seekExact(text); didDecode = false; return current != null; }
@Override public boolean seekExact(BytesRef text) throws IOException { if (in.seekExact(text) == null) { return false; } else { return true; } }
@Override public boolean seekExact(BytesRef text) throws IOException { if (in.seekExact(text) == null) { return false; } else { return true; } }
@Override public boolean seekExact(BytesRef text) throws IOException { final BytesRefFSTEnum.InputOutput<PairOutputs.Pair<Long,PairOutputs.Pair<Long,Long>>> result = fstEnum.seekExact(text); if (result != null) { PairOutputs.Pair<Long,PairOutputs.Pair<Long,Long>> pair1 = result.output; PairOutputs.Pair<Long,Long> pair2 = pair1.output2; docsStart = pair1.output1; docFreq = pair2.output1.intValue(); totalTermFreq = pair2.output2; return true; } else { return false; } }
@Override public boolean seekExact(BytesRef target) throws IOException { updateEnum(fstEnum.seekExact(target)); return term != null; }
@Override public boolean seekExact(BytesRef target) throws IOException { updateEnum(fstEnum.seekExact(target)); return term != null; }
@Override public void seekExact(long ord) throws IOException { // TODO: would be better to make this simpler and faster. // but we dont want to introduce a bug that corrupts our enum state! bytesReader.setPosition(0); fst.getFirstArc(firstArc); IntsRef output = Util.getByOutput(fst, ord, bytesReader, firstArc, scratchArc, scratchInts); // TODO: we could do this lazily, better to try to push into FSTEnum though? in.seekExact(Util.toBytesRef(output, new BytesRefBuilder())); }
@Override public void seekExact(long ord) throws IOException { // TODO: would be better to make this simpler and faster. // but we dont want to introduce a bug that corrupts our enum state! bytesReader.setPosition(0); fst.getFirstArc(firstArc); IntsRef output = Util.getByOutput(fst, ord, bytesReader, firstArc, scratchArc, scratchInts); BytesRefBuilder scratchBytes = new BytesRefBuilder(); scratchBytes.clear(); Util.toBytesRef(output, scratchBytes); // TODO: we could do this lazily, better to try to push into FSTEnum though? in.seekExact(scratchBytes.get()); }