org.apache.lucene.search
public class TopFieldDocCollector extends TopDocCollector
This may be extended, overriding the collect method to, e.g.,
conditionally invoke super() in order to filter which
documents are collected.
| Constructor Summary | |
|---|---|
| TopFieldDocCollector(IndexReader reader, Sort sort, int numHits) Construct to collect a given number of hits. | |
| Method Summary | |
|---|---|
| void | collect(int doc, float score) |
| TopDocs | topDocs() |
Parameters: reader the index to be searched sort the sort criteria numHits the maximum number of hits to collect