Can we use _score value in script_fields in elasticsearch 6.2?


(Suyog Kale) #1

Using: Elasticsearch 6.2
Default script: painless
Can we use _score value in script_fields
Below query always returns 0 value for custom_score
{
"query": {
"match_all": {}
},
"script_fields": {
"custom_score": {
"script": {
"source": "params.factor * _score",
"params": {
"factor": 200
}
}
}
}
}


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.