com.atlassian.jira.issue.statistics.util
Class TwoDimensionalTermHitCollector
java.lang.Object
org.apache.lucene.search.Collector
com.atlassian.jira.issue.statistics.util.TwoDimensionalTermHitCollector
public class TwoDimensionalTermHitCollector
- extends org.apache.lucene.search.Collector
A HitCollector that creates a doc -> term mapping. This is useful for collecting documents where there are a
limited number of terms. The caching also ensures that if multiple searches sort on the same terms, the doc -> term
mapping is maintained.
This HitCollector can be quite memory intensive, however the cache is stored with a weak reference, so it will
be garbage collected.
- Since:
- v3.11
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TwoDimensionalTermHitCollector
public TwoDimensionalTermHitCollector(TwoDimensionalStatsMap statsMap,
org.apache.lucene.index.IndexReader indexReader,
FieldVisibilityManager fieldVisibilityManager,
ReaderCache readerCache)
TwoDimensionalTermHitCollector
public TwoDimensionalTermHitCollector(TwoDimensionalStatsMap statsMap,
org.apache.lucene.index.IndexReader indexReader,
FieldVisibilityManager fieldVisibilityManager,
ReaderCache readerCache,
LuceneFieldSorter aggregateField)
- Update a statsMap, using the values from the
aggregateField
. Example, you can sum the votes.
- Parameters:
statsMap
- stats mapindexReader
- index readerfieldVisibilityManager
- used to determine if the stat fields are visiblereaderCache
- used to cache stats values at the reader levelaggregateField
- lucene field sorter
collect
public void collect(int i)
- Specified by:
collect
in class org.apache.lucene.search.Collector
setScorer
public void setScorer(org.apache.lucene.search.Scorer scorer)
throws IOException
- Specified by:
setScorer
in class org.apache.lucene.search.Collector
- Throws:
IOException
setNextReader
public void setNextReader(org.apache.lucene.index.IndexReader reader,
int docBase)
throws IOException
- Specified by:
setNextReader
in class org.apache.lucene.search.Collector
- Throws:
IOException
acceptsDocsOutOfOrder
public boolean acceptsDocsOutOfOrder()
- Specified by:
acceptsDocsOutOfOrder
in class org.apache.lucene.search.Collector
Copyright © 2002-2012 Atlassian. All Rights Reserved.