How can I use multiple scripts within script_score query in 7.4? I need to apply a filter on the result set and then define corresponding scripts.
The function_score query currently being used has the following format:
POST index1, index2, index3/_seacrh
{
"query": {
"function_score": {
"query": {},
"functions": [
{
"filter": {},
"script_score": {
"script": {
"source": "",
"lang": "painless"
}
}
},
{
"filter": {},
"script_score": {
"script": {
"source": "",
"lang": "painless"
}
}
}
],
"score_mode": "sum",
"boost_mode": "sum",
"boost": 1
}
}
}
I am trying to replace the function score query with script_score.