Package org.elasticsearch.action.search
Class MaxScoreCollector
java.lang.Object
org.apache.lucene.search.SimpleCollector
org.elasticsearch.action.search.MaxScoreCollector
- All Implemented Interfaces:
org.apache.lucene.search.Collector,org.apache.lucene.search.LeafCollector
public class MaxScoreCollector
extends org.apache.lucene.search.SimpleCollector
A collector that computes the maximum score.
-
Constructor Summary
Constructors Constructor Description MaxScoreCollector() -
Method Summary
Modifier and Type Method Description voidcollect(int doc)floatgetMaxScore()Get the maximum score.org.apache.lucene.search.ScoreModescoreMode()voidsetScorer(org.apache.lucene.search.Scorable scorer)Methods inherited from class org.apache.lucene.search.SimpleCollector
doSetNextReader, getLeafCollector
-
Constructor Details
-
MaxScoreCollector
public MaxScoreCollector()
-
-
Method Details
-
setScorer
public void setScorer(org.apache.lucene.search.Scorable scorer)- Specified by:
setScorerin interfaceorg.apache.lucene.search.LeafCollector- Overrides:
setScorerin classorg.apache.lucene.search.SimpleCollector
-
scoreMode
public org.apache.lucene.search.ScoreMode scoreMode() -
collect
public void collect(int doc) throws java.io.IOException- Specified by:
collectin interfaceorg.apache.lucene.search.LeafCollector- Specified by:
collectin classorg.apache.lucene.search.SimpleCollector- Throws:
java.io.IOException
-
getMaxScore
public float getMaxScore()Get the maximum score. This returnsFloat.NaNif no hits were collected.
-