Method Create
Create(Boolean, Boolean, Double)
Creates a CachingCollector which does not wrap another collector. The cached documents and scores can later be replayed (Replay(ICollector)).
Declaration
public static CachingCollector Create(bool acceptDocsOutOfOrder, bool cacheScores, double maxRAMMB)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | acceptDocsOutOfOrder | whether documents are allowed to be collected out-of-order |
System.Boolean | cacheScores | |
System.Double | maxRAMMB |
Returns
Type | Description |
---|---|
CachingCollector |
Create(ICollector, Boolean, Double)
Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified RAM threshold.
Declaration
public static CachingCollector Create(ICollector other, bool cacheScores, double maxRAMMB)
Parameters
Type | Name | Description |
---|---|---|
ICollector | other | The ICollector to wrap and delegate calls to. |
System.Boolean | cacheScores | Whether to cache scores in addition to document IDs. Note that this increases the RAM consumed per doc. |
System.Double | maxRAMMB | The maximum RAM in MB to consume for caching the documents and scores. If the collector exceeds the threshold, no documents and scores are cached. |
Returns
Type | Description |
---|---|
CachingCollector |
Create(ICollector, Boolean, Int32)
Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified max docs threshold.
Declaration
public static CachingCollector Create(ICollector other, bool cacheScores, int maxDocsToCache)
Parameters
Type | Name | Description |
---|---|---|
ICollector | other | The ICollector to wrap and delegate calls to. |
System.Boolean | cacheScores | Whether to cache scores in addition to document IDs. Note that this increases the RAM consumed per doc. |
System.Int32 | maxDocsToCache | The maximum number of documents for caching the documents and possible the scores. If the collector exceeds the threshold, no documents and scores are cached. |
Returns
Type | Description |
---|---|
CachingCollector |