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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
collect
(int i) abstract void
collect
(org.apache.lucene.document.Document d) void
doSetNextReader
(org.apache.lucene.index.LeafReaderContext context) This method should cache up the FieldSelector, such that overhead will be as small as possible when this method is called from thecollect(int)
method.boolean
Methods inherited from class org.apache.lucene.search.SimpleCollector
getLeafCollector, setScorer
-
Constructor Details
-
FieldDocumentHitCollector
public FieldDocumentHitCollector()
-
-
Method Details
-
collect
- Specified by:
collect
in interfaceorg.apache.lucene.search.LeafCollector
- Specified by:
collect
in classorg.apache.lucene.search.SimpleCollector
- Throws:
IOException
-
doSetNextReader
- Overrides:
doSetNextReader
in classorg.apache.lucene.search.SimpleCollector
- Throws:
IOException
-
getFieldsToLoad
This method should cache up the FieldSelector, such that overhead will be as small as possible when this method is called from thecollect(int)
method.- Returns:
- a
Set
of fields to load
-
collect
- Throws:
IOException
-
needsScores
public boolean needsScores()
-