ElasticSearch: Ranking with multiple weighted functions; when using random_score other functions are ignored ElasticSearch: Ranking with multiple weighted functions; when using random_score other functions are ignored elasticsearch elasticsearch

ElasticSearch: Ranking with multiple weighted functions; when using random_score other functions are ignored


I feel this is an issue with the seed value you are providing.The seed value is used to compute the random score.Same seed value always give the same random number.

Hence if you remove the seed value from your query , it should work fine.You can refer to this sample -

"function_score": {    "query": ...,    "functions": [        {            "random_score" : {            },            "weight": 0.1        },        {            "field_value_factor": {                "field":    "score"            },            "weight": 1        }    ],    "score_mode": "multiply"}

If you want to use the seed value , then try using a very big number.