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
ARescorer
that uses an expression to re-score first pass hits. Functionally this is the same asSortRescorer
(if you build theSort
usingExpression.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 Bindings
bindings
private Expression
expression
-
Constructor Summary
Constructors Constructor Description ExpressionRescorer(Expression expression, Bindings bindings)
Uses the providedExpression
to assign second pass scores.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Explanation
explain(IndexSearcher searcher, Explanation firstPassExplanation, int docID)
Explains how the score for the specified document was computed.private static DoubleValues
scores(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 providedExpression
to 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:Rescorer
Explains how the score for the specified document was computed.- Overrides:
explain
in classSortRescorer
- Throws:
java.io.IOException
-
-