Package org.apache.lucene.expressions
Class ExpressionRescorer
- java.lang.Object
-
- org.apache.lucene.search.Rescorer
-
- org.apache.lucene.search.SortRescorer
-
- org.apache.lucene.expressions.ExpressionRescorer
-
class ExpressionRescorer extends SortRescorer
ARescorerthat uses an expression to re-score first pass hits. Functionally this is the same asSortRescorer(if you build theSortusingExpression.getSortField(org.apache.lucene.expressions.Bindings, boolean)), except for the explain method which gives more detail by showing the value of each variable.
-
-
Field Summary
Fields Modifier and Type Field Description private Bindingsbindingsprivate Expressionexpression
-
Constructor Summary
Constructors Constructor Description ExpressionRescorer(Expression expression, Bindings bindings)Uses the providedExpressionto assign second pass scores.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Explanationexplain(IndexSearcher searcher, Explanation firstPassExplanation, int docID)Explains how the score for the specified document was computed.private static DoubleValuesscores(int doc, float score)-
Methods inherited from class org.apache.lucene.search.SortRescorer
rescore
-
-
-
-
Field Detail
-
expression
private final Expression expression
-
bindings
private final Bindings bindings
-
-
Constructor Detail
-
ExpressionRescorer
public ExpressionRescorer(Expression expression, Bindings bindings)
Uses the providedExpressionto assign second pass scores.
-
-
Method Detail
-
scores
private static DoubleValues scores(int doc, float score)
-
explain
public Explanation explain(IndexSearcher searcher, Explanation firstPassExplanation, int docID) throws java.io.IOException
Description copied from class:RescorerExplains how the score for the specified document was computed.- Overrides:
explainin classSortRescorer- Throws:
java.io.IOException
-
-