Decay filter function for a no-limit value with ElasticSearch Decay filter function for a no-limit value with ElasticSearch elasticsearch elasticsearch

Decay filter function for a no-limit value with ElasticSearch


You could try a "field_value_factor", as per this section in the documentation. And you'd need to test and assess the results, modify the "factor" and the boost you are giving to "title" and then test again and see if it's getting closer to what you need. Also, you can use search=explain to see how ES computes the _score. Something like this:

POST /threads/_search?explain{  "query": {      "function_score": {         "query": {            "multi_match": {               "query": "air france",               "type": "phrase",               "fields": [                  "title^8",                  "desc"               ]            }         },         "functions": [            {               "exp": {                  "date": {                     "origin": "2014/09/29 13:00:00",                     "scale": "12h",                     "offset":"6h",                     "decay":0.5                  }               }            },            {              "field_value_factor": {                "field": "views",                "modifier": "log2p",                "factor": 0.1              }            },            {              "field_value_factor": {                "field": "likes",                "modifier": "log2p",                "factor": 0.1              }            }         ]      }   }}