@Override public final int nextDoc() throws IOException { while (true) { int doc = in.nextDoc(); if (doc == NO_MORE_DOCS) { return NO_MORE_DOCS; } else if (twoPhaseCurrentDocMatches()) { return doc; } } }
@Override public final int advance(int target) throws IOException { int doc = in.advance(target); while (doc != NO_MORE_DOCS) { if (twoPhaseCurrentDocMatches()) { break; } doc = in.nextDoc(); } return doc; }
@Override public int nextDoc() throws IOException { return in.nextDoc(); }
@Override public int nextDoc() throws IOException { return in.nextDoc(); }
@Override public int nextDoc() throws IOException { return source.nextDoc(); }
@Override public int nextDoc() throws IOException { return in.nextDoc(); }
@Override public int nextDoc() throws IOException { return in.nextDoc(); }
@Override public final int nextDoc() throws IOException { while (true) { int doc = in.nextDoc(); if (doc == NO_MORE_DOCS) { return NO_MORE_DOCS; } else if (twoPhaseCurrentDocMatches()) { return doc; } } }
@Override public final int nextDoc() throws IOException { while (true) { int doc = in.nextDoc(); if (doc == NO_MORE_DOCS) { return NO_MORE_DOCS; } else if (twoPhaseCurrentDocMatches()) { return doc; } } }
@Override public final int nextDoc() throws IOException { while (true) { int doc = in.nextDoc(); if (doc == NO_MORE_DOCS) { return NO_MORE_DOCS; } else if (twoPhaseCurrentDocMatches()) { return doc; } } }
@Override public final int advance(int target) throws IOException { int doc = in.advance(target); while (doc != NO_MORE_DOCS) { if (twoPhaseCurrentDocMatches()) { break; } doc = in.nextDoc(); } return doc; }
@Override public final int advance(int target) throws IOException { int doc = in.advance(target); while (doc != NO_MORE_DOCS) { if (twoPhaseCurrentDocMatches()) { break; } doc = in.nextDoc(); } return doc; }
@Override public final int advance(int target) throws IOException { int doc = in.advance(target); while (doc != NO_MORE_DOCS) { if (twoPhaseCurrentDocMatches()) { break; } doc = in.nextDoc(); } return doc; }
for (LeafReaderContext arc: reader.leaves()) { Spans spans = weight.getSpans(arc, Postings.OFFSETS); while(spans != null && spans.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) { while (spans.nextStartPosition() != Spans.NO_MORE_POSITIONS) { int doc = arc.docBase + spans.docID(); Spans spans = weight.getSpans(scrw.getContext(), Postings.OFFSETS); hitsFound = false; while(spans != null && spans.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) { while(spans.nextStartPosition() != Spans.NO_MORE_POSITIONS) { System.out.println(String.format(" doc %7d, pos %4d-%4d", spans.docID(), spans.startPosition(), spans.endPosition()));
private void getPayloads(Collection<byte []> payloads, SpanQuery query) throws IOException { final IndexSearcher searcher = new IndexSearcher(context); searcher.setQueryCache(null); SpanWeight w = (SpanWeight) searcher.createNormalizedWeight(query, false); PayloadSpanCollector collector = new PayloadSpanCollector(); for (LeafReaderContext leafReaderContext : context.leaves()) { final Spans spans = w.getSpans(leafReaderContext, SpanWeight.Postings.PAYLOADS); if (spans != null) { while (spans.nextDoc() != Spans.NO_MORE_DOCS) { while (spans.nextStartPosition() != Spans.NO_MORE_POSITIONS) { collector.reset(); spans.collect(collector); payloads.addAll(collector.getPayloads()); } } } } } }
private void getPayloads(Collection<byte []> payloads, SpanQuery query) throws IOException { final IndexSearcher searcher = new IndexSearcher(context); searcher.setQueryCache(null); query = (SpanQuery) searcher.rewrite(query); SpanWeight w = (SpanWeight) searcher.createWeight(query, false, 1); PayloadSpanCollector collector = new PayloadSpanCollector(); for (LeafReaderContext leafReaderContext : context.leaves()) { final Spans spans = w.getSpans(leafReaderContext, SpanWeight.Postings.PAYLOADS); if (spans != null) { while (spans.nextDoc() != Spans.NO_MORE_DOCS) { while (spans.nextStartPosition() != Spans.NO_MORE_POSITIONS) { collector.reset(); spans.collect(collector); payloads.addAll(collector.getPayloads()); } } } } } }
while (spans.nextDoc() != Spans.NO_MORE_DOCS) { if (acceptDocs != null && acceptDocs.get(spans.docID()) == false) { continue;
CodecInfo mtasCodecInfo = CodecInfo.getCodecInfoFromTerms(terms); if (spans != null) { while (spans.nextDoc() != Spans.NO_MORE_DOCS) { if (segmentReader.numDocs() == segmentReader.maxDoc() || segmentReader.getLiveDocs().get(spans.docID())) {