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

java.lang.Object
  extended by org.apache.lucene.search.Collector
      extended by com.atlassian.jira.issue.statistics.util.FieldableDocumentHitCollector
Direct Known Subclasses:
PrefixFieldableHitCollector

public abstract class FieldableDocumentHitCollector
extends org.apache.lucene.search.Collector

A Lucene search Collector that retrieves only a subset of fields within the Document for each result.

See Also:
DocumentHitCollector

Field Summary
protected  org.apache.lucene.search.IndexSearcher searcher
           
 
Constructor Summary
protected FieldableDocumentHitCollector(org.apache.lucene.search.IndexSearcher searcher)
           
 
Method Summary
 boolean acceptsDocsOutOfOrder()
           
abstract  void collect(org.apache.lucene.document.Document d)
           
 void collect(int i)
           
protected abstract  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 collect(int) method.
 void setNextReader(org.apache.lucene.index.IndexReader reader, int docBase)
           
 void setScorer(org.apache.lucene.search.Scorer scorer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

searcher

protected final org.apache.lucene.search.IndexSearcher searcher
Constructor Detail

FieldableDocumentHitCollector

protected FieldableDocumentHitCollector(org.apache.lucene.search.IndexSearcher searcher)
Method Detail

collect

public void collect(int i)
Specified by:
collect in class org.apache.lucene.search.Collector

setScorer

public void setScorer(org.apache.lucene.search.Scorer scorer)
               throws IOException
Specified by:
setScorer in class org.apache.lucene.search.Collector
Throws:
IOException

setNextReader

public void setNextReader(org.apache.lucene.index.IndexReader reader,
                          int docBase)
                   throws IOException
Specified by:
setNextReader in class org.apache.lucene.search.Collector
Throws:
IOException

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Specified by:
acceptsDocsOutOfOrder in class org.apache.lucene.search.Collector

getFieldSelector

protected abstract 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 collect(int) method.

Returns:
a FieldSelector

collect

public abstract void collect(org.apache.lucene.document.Document d)


Copyright © 2002-2012 Atlassian. All Rights Reserved.