0
"query": {
    "function_score": {
        "filter" : {
            "bool" : {
                "must" : [
                    { "terms" : { "content" : "test"} }
                ]
            }

        },
        "functions": [{
            "exp": {
                "date": {
                      "origin": "now",
                      "scale": "1d",
                      "decay" : 0.05
                }
            },
            "script_score": {
                "script": "_score * 10",
                "lang":"groovy"
            }   
        }],
        "score_mode": "multiply"
    }
}}

"functions" scores do not multiply. Score is calculated only using last function. If I swap places "exp" with "script_score", "exp" score will be shown. What is the problem? Notice: "script_score" is just a dummy function.

eliasah
  • 39,588
  • 11
  • 124
  • 154

1 Answers1

0

My query was wrong, it should be:

{"exp": {
    "date": {
          "origin": "now",
          "scale": "1d",
          "decay" : 0.05
    }
}},
{"script_score": {
    "script": "_score * 10",
    "lang":"groovy"
}}