Class AbstractDocumentCollector<T>
- java.lang.Object
-
- org.apache.lucene.search.Collector
-
- com.atlassian.confluence.internal.index.lucene.AbstractDocumentCollector<T>
-
- Type Parameters:
T
- the generic type of the object accepted by the consumer. This could be a key-value map of the fields or aScannedDocument
instance
- Direct Known Subclasses:
FieldValuesCollector
,ScoredDocumentCollector
public abstract class AbstractDocumentCollector<T> extends org.apache.lucene.search.Collector
An abstract Collector that exposes a Consumer which in turn accepts an object of a generic type- Since:
- 7.17
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>
requestedFields
-
Constructor Summary
Constructors Constructor Description AbstractDocumentCollector(org.apache.lucene.search.IndexSearcher indexSearcher, Set<String> requestedFields, Consumer<T> consumer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
acceptsDocsOutOfOrder()
void
collect(int docID)
long
getCount()
protected Map<String,String[]>
getRequestedFields(org.apache.lucene.document.Document document)
void
setIndexSearcher(org.apache.lucene.search.IndexSearcher indexSearcher)
void
setNextReader(org.apache.lucene.index.AtomicReaderContext readerContext)
abstract T
toConsumable(org.apache.lucene.document.Document document)
-
-
-
Method Detail
-
setNextReader
public void setNextReader(org.apache.lucene.index.AtomicReaderContext readerContext)
- Specified by:
setNextReader
in classorg.apache.lucene.search.Collector
-
acceptsDocsOutOfOrder
public boolean acceptsDocsOutOfOrder()
- Specified by:
acceptsDocsOutOfOrder
in classorg.apache.lucene.search.Collector
-
collect
public void collect(int docID) throws IOException
- Specified by:
collect
in classorg.apache.lucene.search.Collector
- Throws:
IOException
-
toConsumable
public abstract T toConsumable(org.apache.lucene.document.Document document)
-
getCount
public long getCount()
-
setIndexSearcher
public void setIndexSearcher(org.apache.lucene.search.IndexSearcher indexSearcher)
-
-