query works in ES (v0.90.3) but not in any other version. Currently tried on (v1.2.1) query works in ES (v0.90.3) but not in any other version. Currently tried on (v1.2.1) elasticsearch elasticsearch

query works in ES (v0.90.3) but not in any other version. Currently tried on (v1.2.1)


custom_score deprecated in new versions. Use Function Score Query instead of custom_score.

The custom_score query

"custom_score": {"params": {    "param1": 2,    "param2": 3.1},"query": {...},"script": "_score * doc['my_numeric_field'].value / pow(param1, param2)"}

becomes

"function_score": {"boost_mode": "replace","query": {...},"script_score": {    "params": {        "param1": 2,        "param2": 3.1    },    "script": "_score * doc['my_numeric_field'].value / pow(param1, param2)"}}


try to replace "match_all":[] with "match_all":{}