Class ScoredDocumentCollector
- java.lang.Object
-
- org.apache.lucene.search.Collector
-
- com.atlassian.confluence.internal.index.lucene.AbstractDocumentCollector<ScannedDocument>
-
- com.atlassian.confluence.internal.index.lucene.ScoredDocumentCollector
-
public class ScoredDocumentCollector extends AbstractDocumentCollector<ScannedDocument>
This collector stores the score of the document into the v2ScannedDocument
so that the consumer can do further computation based on it- Since:
- 7.17
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.internal.index.lucene.AbstractDocumentCollector
requestedFields
-
-
Constructor Summary
Constructors Constructor Description ScoredDocumentCollector(org.apache.lucene.search.IndexSearcher indexSearcher, Set<String> requestedFields, Consumer<ScannedDocument> consumer, float defaultScore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setScorer(org.apache.lucene.search.Scorer scorer)
ScannedDocument
toConsumable(org.apache.lucene.document.Document document)
-
Methods inherited from class com.atlassian.confluence.internal.index.lucene.AbstractDocumentCollector
acceptsDocsOutOfOrder, collect, getCount, getRequestedFields, setIndexSearcher, setNextReader
-
-
-
-
Constructor Detail
-
ScoredDocumentCollector
public ScoredDocumentCollector(org.apache.lucene.search.IndexSearcher indexSearcher, Set<String> requestedFields, Consumer<ScannedDocument> consumer, float defaultScore)
-
-
Method Detail
-
toConsumable
public ScannedDocument toConsumable(org.apache.lucene.document.Document document)
- Specified by:
toConsumable
in classAbstractDocumentCollector<ScannedDocument>
-
setScorer
public void setScorer(org.apache.lucene.search.Scorer scorer) throws IOException
- Specified by:
setScorer
in classorg.apache.lucene.search.Collector
- Throws:
IOException
-
-