package it.cavallium.dbengine.lucene; import java.io.Closeable; import java.io.IOException; import org.apache.lucene.search.TotalHits; import reactor.core.publisher.Flux; public class LazyFullDocs implements FullDocs { private final ResourceIterable pq; private final TotalHits totalHits; public LazyFullDocs(ResourceIterable pq, TotalHits totalHits) { this.pq = pq; this.totalHits = totalHits; } @Override public Flux iterate() { return pq.iterate(); } @Override public Flux iterate(long skips) { return pq.iterate(skips); } @Override public TotalHits totalHits() { return totalHits; } @Override public void close() { pq.close(); } }