Class FunctionScoreQuery.FilterScoreFunction
- java.lang.Object
-
- org.elasticsearch.common.lucene.search.function.ScoreFunction
-
- org.elasticsearch.common.lucene.search.function.FunctionScoreQuery.FilterScoreFunction
-
- Enclosing class:
- FunctionScoreQuery
public static class FunctionScoreQuery.FilterScoreFunction extends ScoreFunction
-
-
Field Summary
Fields Modifier and Type Field Description org.apache.lucene.search.Query
filter
ScoreFunction
function
-
Constructor Summary
Constructors Constructor Description FilterScoreFunction(org.apache.lucene.search.Query filter, ScoreFunction function)
-
Method Summary
Modifier and Type Method Description protected boolean
doEquals(ScoreFunction other)
Indicates whether some otherScoreFunction
object of the same type is "equal to" this one.protected int
doHashCode()
LeafScoreFunction
getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)
float
getWeight()
boolean
needsScores()
Indicates if document scores are needed by this function.protected ScoreFunction
rewrite(org.apache.lucene.index.IndexReader reader)
-
Methods inherited from class org.elasticsearch.common.lucene.search.function.ScoreFunction
equals, getDefaultScoreCombiner, hashCode
-
-
-
-
Field Detail
-
filter
public final org.apache.lucene.search.Query filter
-
function
public final ScoreFunction function
-
-
Constructor Detail
-
FilterScoreFunction
public FilterScoreFunction(org.apache.lucene.search.Query filter, ScoreFunction function)
-
-
Method Detail
-
getLeafScoreFunction
public LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
- Specified by:
getLeafScoreFunction
in classScoreFunction
- Throws:
java.io.IOException
-
needsScores
public boolean needsScores()
Description copied from class:ScoreFunction
Indicates if document scores are needed by this function.- Specified by:
needsScores
in classScoreFunction
- Returns:
true
if scores are needed.
-
doEquals
protected boolean doEquals(ScoreFunction other)
Description copied from class:ScoreFunction
Indicates whether some otherScoreFunction
object of the same type is "equal to" this one.- Specified by:
doEquals
in classScoreFunction
-
doHashCode
protected int doHashCode()
- Specified by:
doHashCode
in classScoreFunction
-
rewrite
protected ScoreFunction rewrite(org.apache.lucene.index.IndexReader reader) throws java.io.IOException
- Overrides:
rewrite
in classScoreFunction
- Throws:
java.io.IOException
-
getWeight
public float getWeight()
- Overrides:
getWeight
in classScoreFunction
-
-