Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed the explanation

  • Loading branch information...
commit d32e05f2042e8af2473d2b2cba4bfe4becf78a0d 1 parent 3f67045
@sguo authored
View
11 sensei-core/src/main/java/com/senseidb/search/query/ScoreAugmentQuery.java
@@ -67,7 +67,7 @@
/**
* @return the String to explain how the new score is generated;
*/
- public String getExplainString();
+ public String getExplainString(float rawscore, int docID);
/**
@@ -157,9 +157,14 @@ protected Explanation createExplain(Explanation innerExplain,
_func.initializeReader((BoboIndexReader)reader, _jsonParam);
float innerValue = innerExplain.getValue();
- float value = _func.newScore(innerValue, doc);
+ float value = 0;
+ if(_func.useInnerScore())
+ value = _func.newScore(innerValue, doc);
+ else
+ value = _func.newScore(doc);
+
finalExpl.setValue(value);
- finalExpl.setDescription("Custom score: "+ _func.getExplainString() );
+ finalExpl.setDescription("Custom score: "+ _func.getExplainString(innerValue, doc) );
return finalExpl;
}
else{
View
2  sensei-core/src/main/java/com/senseidb/search/relevance/RuntimeRelevanceFunction.java
@@ -679,7 +679,7 @@ public float newScore(int docID)
}
@Override
- public String getExplainString()
+ public String getExplainString(float innerScore, int doc)
{
return _dt.funcBody;
}
Please sign in to comment.
Something went wrong with that request. Please try again.