@Override public final boolean incrementToken() throws IOException { skippedPositions = 0; while (input.incrementToken()) { if (accept()) { if (skippedPositions != 0) { posIncrAtt.setPositionIncrement(posIncrAtt.getPositionIncrement() + skippedPositions); } return true; } skippedPositions += posIncrAtt.getPositionIncrement(); } // reached EOS -- return false return false; }
@Override final public void reset() throws IOException { super.reset(); payload = null; }
@Override public void reset() throws IOException { if (expiry < System.currentTimeMillis()) { if (Files.getLastModifiedTime(stopWordPath).toMillis() > lastModifed) { loadStopWordSet(); } expiry = System.currentTimeMillis() + reloadInterval; } super.reset(); }
@Override public final boolean incrementToken() throws IOException { skippedPositions = 0; while (input.incrementToken()) { if (accept()) { if (skippedPositions != 0) { posIncrAtt.setPositionIncrement(posIncrAtt.getPositionIncrement() + skippedPositions); } return true; } skippedPositions += posIncrAtt.getPositionIncrement(); } // reached EOS -- return false return false; }