I was reading about decay functions in ElasticSearch in order to promote more recent results
If I define decay function as following:
"DECAY_FUNCTION": {
"FIELD_NAME": {
"origin": "2013-09-17",
"scale": "10d",
"offset": "5d",
"decay": 0.5
}
}
How the score will be affected within the Offset, Scale regions and outside them?
Depending on this reference query-dsl-function-score-query I will answer my question:
Let's take this slope as example:
Here the origin is age=40 and we have offset=+-5 years. So the decay function will return value of 1 inside offset [35-45].
Inside Scale the function will return the value of decay(which is in our example 0.5)
The regions outside Scale(which are more than 50 and less than 35), decay function will decrease further towards 0 value.
PS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With