com.atlassian.jira.issue.statistics.util
Class TwoDimensionalTermHitCollector
java.lang.Object
org.apache.lucene.search.HitCollector
com.atlassian.jira.issue.statistics.util.TwoDimensionalTermHitCollector
public class TwoDimensionalTermHitCollector
- extends org.apache.lucene.search.HitCollector
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
Method Summary |
void |
collect(int i,
float v)
|
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,
float v)
- Specified by:
collect
in class org.apache.lucene.search.HitCollector
Copyright © 2002-2010 Atlassian. All Rights Reserved.