com.atlassian.jira.issue.statistics.util
Class OneDimensionalObjectHitCollector
java.lang.Object
org.apache.lucene.search.HitCollector
com.atlassian.jira.issue.statistics.util.OneDimensionalObjectHitCollector
public class OneDimensionalObjectHitCollector
- extends org.apache.lucene.search.HitCollector
A HitCollector that creates a doc -> object 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 -> object
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.
This HitCollector differs from OneDimensionalTermHitCollector
in that it performs the term -> object conversion
here, rather than later. This is more expensive, but useful for StatisticsMappers that perform some sort of runtime
conversion / translation (eg a StatisticsMapper that groups dates by Month, or groups users by email domain name).
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 |
OneDimensionalObjectHitCollector
public OneDimensionalObjectHitCollector(StatisticsMapper statisticsMapper,
Map result,
org.apache.lucene.index.IndexReader indexReader)
collect
public void collect(int i,
float v)
- Specified by:
collect
in class org.apache.lucene.search.HitCollector
Copyright © 2002-2011 Atlassian. All Rights Reserved.