mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
Query DSL: custom score script, allow to use _score
as well as score
as the underlying query score, closes #316.
This commit is contained in:
parent
98bc8285ea
commit
2bd9a63467
@ -120,6 +120,7 @@ public class CustomScoreQueryParser extends AbstractIndexComponent implements XC
|
||||
|
||||
@Override public float score(int docId, float subQueryScore) {
|
||||
vars.put("score", subQueryScore);
|
||||
vars.put("_score", subQueryScore);
|
||||
return ((Number) scriptFieldsFunction.execute(docId, vars)).floatValue();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user