I am trying to modify a search score in elasticsearch by multiplying the _score by the square root of a single value stored with each document. Below is the JSON query I am using. Where have I gone wrong?
{
"index": "resources",
"type": "page",
"from": "0",
"size": "20",
"body": {
"query": {
"match": {
"content": "baseball"
},
"function_score": {
"functions": [{
"script_score": {
"params": [],
"script": "_score * sqrt(page['obls'].value)"
}
}]
}
}
}
}
Thanks in advance for your help!