com.atlassian.jira.issue.statistics.util
Class OneDimensionalDocHitCollector

java.lang.Object
  extended by org.apache.lucene.search.Collector
      extended by com.atlassian.jira.issue.statistics.util.FieldableDocumentHitCollector
          extended by com.atlassian.jira.issue.statistics.util.OneDimensionalDocHitCollector

public class OneDimensionalDocHitCollector
extends FieldableDocumentHitCollector

A HitCollector that accesses the document directly to get the values for a field. This HitCollector has low memory usage (it iterates over the documents as neccessary), and is useful when you are doing a collection where there are a limited number of documents, but a large number of terms in the entire index.


Constructor Summary
OneDimensionalDocHitCollector(String luceneGroupField, Map result, org.apache.lucene.search.IndexSearcher searcher)
           
 
Method Summary
 void collect(org.apache.lucene.document.Document d)
           
protected  org.apache.lucene.document.FieldSelector getFieldSelector()
          This method should cache up the FieldSelector, such that overhead will be as small as possible when this method is called from the FieldableDocumentHitCollector.collect(int) method.
 
Methods inherited from class com.atlassian.jira.issue.statistics.util.FieldableDocumentHitCollector
acceptsDocsOutOfOrder, collect, setNextReader, setScorer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneDimensionalDocHitCollector

public OneDimensionalDocHitCollector(String luceneGroupField,
                                     Map result,
                                     org.apache.lucene.search.IndexSearcher searcher)
Method Detail

getFieldSelector

protected org.apache.lucene.document.FieldSelector getFieldSelector()
Description copied from class: FieldableDocumentHitCollector
This method should cache up the FieldSelector, such that overhead will be as small as possible when this method is called from the FieldableDocumentHitCollector.collect(int) method.

Specified by:
getFieldSelector in class FieldableDocumentHitCollector
Returns:
a FieldSelector

collect

public void collect(org.apache.lucene.document.Document d)
Specified by:
collect in class FieldableDocumentHitCollector


Copyright © 2002-2014 Atlassian. All Rights Reserved.