Package org.apache.solr.search
Class ReRankScaler
- java.lang.Object
-
- org.apache.solr.search.ReRankScaler
-
public class ReRankScaler extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReRankScaler.MinMaxExplain
static class
ReRankScaler.ReRankScalerExplain
-
Field Summary
Fields Modifier and Type Field Description protected boolean
explainResults
protected int
mainQueryMax
protected int
mainQueryMin
protected ReRankOperator
reRankOperator
protected int
reRankQueryMax
protected int
reRankQueryMin
protected ReRankScaler.ReRankScalerExplain
reRankScalerExplain
-
Constructor Summary
Constructors Constructor Description ReRankScaler(String mainScale, String reRankScale, double reRankScaleWeight, ReRankOperator reRankOperator, org.apache.lucene.search.QueryRescorer replaceRescorer, boolean explainResults)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static float
combineScores(float orginalScore, float reRankScore, double reRankScaleWeight, ReRankOperator reRankOperator)
boolean
equals(Object o)
org.apache.lucene.search.Explanation
explain(int doc, org.apache.lucene.search.Explanation mainQueryExplain, org.apache.lucene.search.Explanation reRankQueryExplain)
int
getMainQueryMax()
int
getMainQueryMin()
static ReRankScaler.MinMaxExplain
getMinMaxExplain(float scaleMin, float scaleMax, Map<Integer,Float> docScoreMap)
org.apache.lucene.search.QueryRescorer
getReplaceRescorer()
int
getReRankQueryMax()
int
getReRankQueryMin()
ReRankScaler.ReRankScalerExplain
getReRankScalerExplain()
double
getReRankScaleWeight()
int
hashCode()
static Map<Integer,Float>
minMaxScaleScores(Map<Integer,Float> docScoreMap, ReRankScaler.MinMaxExplain explain)
boolean
scaleMainScores()
boolean
scaleReRankScores()
boolean
scaleScores()
org.apache.lucene.search.ScoreDoc[]
scaleScores(org.apache.lucene.search.ScoreDoc[] originalDocs, org.apache.lucene.search.ScoreDoc[] rescoredDocs, int howMany)
-
-
-
Field Detail
-
mainQueryMin
protected int mainQueryMin
-
mainQueryMax
protected int mainQueryMax
-
reRankQueryMin
protected int reRankQueryMin
-
reRankQueryMax
protected int reRankQueryMax
-
explainResults
protected boolean explainResults
-
reRankOperator
protected ReRankOperator reRankOperator
-
reRankScalerExplain
protected ReRankScaler.ReRankScalerExplain reRankScalerExplain
-
-
Constructor Detail
-
ReRankScaler
public ReRankScaler(String mainScale, String reRankScale, double reRankScaleWeight, ReRankOperator reRankOperator, org.apache.lucene.search.QueryRescorer replaceRescorer, boolean explainResults) throws SyntaxError
- Throws:
SyntaxError
-
-
Method Detail
-
getReplaceRescorer
public org.apache.lucene.search.QueryRescorer getReplaceRescorer()
-
getMainQueryMin
public int getMainQueryMin()
-
getMainQueryMax
public int getMainQueryMax()
-
getReRankQueryMin
public int getReRankQueryMin()
-
getReRankQueryMax
public int getReRankQueryMax()
-
getReRankScalerExplain
public ReRankScaler.ReRankScalerExplain getReRankScalerExplain()
-
getReRankScaleWeight
public double getReRankScaleWeight()
-
scaleScores
public boolean scaleScores()
-
scaleMainScores
public boolean scaleMainScores()
-
scaleReRankScores
public boolean scaleReRankScores()
-
scaleScores
public org.apache.lucene.search.ScoreDoc[] scaleScores(org.apache.lucene.search.ScoreDoc[] originalDocs, org.apache.lucene.search.ScoreDoc[] rescoredDocs, int howMany)
-
combineScores
public static float combineScores(float orginalScore, float reRankScore, double reRankScaleWeight, ReRankOperator reRankOperator)
-
explain
public org.apache.lucene.search.Explanation explain(int doc, org.apache.lucene.search.Explanation mainQueryExplain, org.apache.lucene.search.Explanation reRankQueryExplain)
-
getMinMaxExplain
public static ReRankScaler.MinMaxExplain getMinMaxExplain(float scaleMin, float scaleMax, Map<Integer,Float> docScoreMap)
-
-