Mercurial Hosting > luan
view src/goodjava/lucene/api/GoodCollector.java @ 1776:da85925fea9c
listen ipv6
author | Vadim Filimonov <fffilimonov@yandex.ru> |
---|---|
date | Fri, 28 Jul 2023 11:53:03 +0300 |
parents | 3ab0d043370f |
children |
line wrap: on
line source
package goodjava.lucene.api; import java.io.IOException; import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.search.Collector; import org.apache.lucene.search.Scorer; public abstract class GoodCollector extends Collector { private int docBase; public boolean acceptsDocsOutOfOrder() { return true; } public void setScorer(Scorer scorer) {} public void setNextReader(AtomicReaderContext context) { this.docBase = context.docBase; } public void collect(int doc) throws IOException { collectDoc(docBase+doc); } public abstract void collectDoc(int doc) throws IOException; }