Class FieldDocumentHitCollector

java.lang.Object
org.apache.lucene.search.SimpleCollector
com.atlassian.jira.issue.statistics.util.FieldDocumentHitCollector
All Implemented Interfaces:
org.apache.lucene.search.Collector, org.apache.lucene.search.LeafCollector
Direct Known Subclasses:
FieldHitCollector

public abstract class FieldDocumentHitCollector extends org.apache.lucene.search.SimpleCollector
A Lucene search Collector that retrieves only a subset of fields within the Document for each result.
  • Constructor Details

    • FieldDocumentHitCollector

      public FieldDocumentHitCollector()
  • Method Details

    • collect

      public void collect(int i) throws IOException
      Specified by:
      collect in interface org.apache.lucene.search.LeafCollector
      Specified by:
      collect in class org.apache.lucene.search.SimpleCollector
      Throws:
      IOException
    • doSetNextReader

      public void doSetNextReader(org.apache.lucene.index.LeafReaderContext context) throws IOException
      Overrides:
      doSetNextReader in class org.apache.lucene.search.SimpleCollector
      Throws:
      IOException
    • getFieldsToLoad

      protected abstract Set<String> getFieldsToLoad()
      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 Set of fields to load
    • collect

      public abstract void collect(org.apache.lucene.document.Document d) throws IOException
      Throws:
      IOException
    • needsScores

      public boolean needsScores()