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).
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public OneDimensionalObjectHitCollector(StatisticsMapper statisticsMapper,
public void collect(int i,
- Specified by:
collect in class
Copyright © 2002-2008 Atlassian. All Rights Reserved.