public class BestDocsDeferringCollector extends DeferringBucketCollector implements Releasable
DeferringBucketCollector that collects all
matches and then replays only the top scoring documents to child
aggregations. The method
createTopDocsCollector(int) is designed to
be overridden and allows subclasses to choose a custom collector
implementation for determining the top N matches.DeferringBucketCollector.WrappedAggregatorNO_OP_COLLECTOR| コンストラクタと説明 |
|---|
BestDocsDeferringCollector(int shardSize,
BigArrays bigArrays)
Sole constructor.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
close() |
protected org.apache.lucene.search.TopDocsCollector<? extends org.apache.lucene.search.ScoreDoc> |
createTopDocsCollector(int size) |
int |
getDocCount(long parentBucket) |
LeafBucketCollector |
getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx) |
boolean |
needsScores() |
void |
postCollection()
Post-collection callback.
|
void |
preCollection()
Pre collection callback.
|
void |
prepareSelectedBuckets(long... selectedBuckets) |
void |
setDeferredCollector(Iterable<BucketCollector> deferredCollectors)
Set the deferred collectors.
|
replay, wrapwrappublic BestDocsDeferringCollector(int shardSize,
BigArrays bigArrays)
shardSize - The number of top-scoring docs to collect for each bucketpublic boolean needsScores()
needsScores インタフェース内 org.apache.lucene.search.Collectorpublic void setDeferredCollector(Iterable<BucketCollector> deferredCollectors)
setDeferredCollector クラス内 DeferringBucketCollectorpublic LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx) throws IOException
getLeafCollector インタフェース内 org.apache.lucene.search.CollectorgetLeafCollector クラス内 BucketCollectorIOExceptionprotected org.apache.lucene.search.TopDocsCollector<? extends org.apache.lucene.search.ScoreDoc> createTopDocsCollector(int size)
throws IOException
IOExceptionpublic void preCollection()
throws IOException
BucketCollectorpreCollection クラス内 BucketCollectorIOExceptionpublic void postCollection()
throws IOException
BucketCollectorpostCollection クラス内 BucketCollectorIOExceptionpublic void prepareSelectedBuckets(long... selectedBuckets)
throws IOException
prepareSelectedBuckets クラス内 DeferringBucketCollectorIOExceptionpublic int getDocCount(long parentBucket)
public void close()
throws ElasticsearchException
close インタフェース内 AutoCloseableclose インタフェース内 ReleasableElasticsearchExceptionCopyright © 2009–2016. All rights reserved.