com.pyxis.greenhopper.jira.util.collector
Class SummaryStatsCollector2

java.lang.Object
  extended by org.apache.lucene.search.Collector
      extended by com.atlassian.jira.issue.statistics.util.DocumentHitCollector
          extended by com.pyxis.greenhopper.jira.util.collector.SummaryStatsCollector
              extended by com.pyxis.greenhopper.jira.util.collector.SummaryStatsCollector2

public class SummaryStatsCollector2
extends SummaryStatsCollector

This HitCollector is called for every version we want statistics for. It will load the related issue document and upgrade the stats counter. Going through the Lucene index this way is faster for a large number of versions than firing individual counting queries, mainly due to JIRA's excessive permission checking. The downside is that each issue document has to be fetched, which by itself is slower than just working on the hit index. Yet, it's still about 50% faster than using individual queries. The HitCollector can be configured to discriminate by different fields using the keyField.

Author:
ahennecke

Field Summary
 
Fields inherited from class com.pyxis.greenhopper.jira.util.collector.SummaryStatsCollector
keyFields
 
Fields inherited from class com.atlassian.jira.issue.statistics.util.DocumentHitCollector
searcher
 
Constructor Summary
SummaryStatsCollector2(org.apache.lucene.search.IndexSearcher searcher, TaskBoardConfiguration taskBoardConfiguration, java.util.Set<WatchedField> watchedFields, java.lang.String... keyFields)
          StatsCollectors are not thread-safe.
 
Method Summary
 
Methods inherited from class com.pyxis.greenhopper.jira.util.collector.SummaryStatsCollector
collect, getStats
 
Methods inherited from class com.atlassian.jira.issue.statistics.util.DocumentHitCollector
acceptsDocsOutOfOrder, collect, setNextReader, setScorer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SummaryStatsCollector2

public SummaryStatsCollector2(org.apache.lucene.search.IndexSearcher searcher,
                              TaskBoardConfiguration taskBoardConfiguration,
                              java.util.Set<WatchedField> watchedFields,
                              java.lang.String... keyFields)
StatsCollectors are not thread-safe. Please create a new one for each request.

Parameters:
searcher - : The Lucene searcher
keyFields - : The fields that identifies the key for the summaries


Copyright © 2007-2012 Atlassian. All Rights Reserved.