ElasticSearch v5 has yet another new scripting language, with groovy being deprecated.
I've ported the xf-date-weighted.groovy script file to xf-date-weighted.painless
Note; requires a code edit to XenForo Enhanced Search to use painless rather than groovy.
I've ported the xf-date-weighted.groovy script file to xf-date-weighted.painless
Code:
return _score / Math.pow(2.0F, Math.min(10.0F * params.halflife, Math.abs(params.now - doc['date'].value)) / params.halflife)
Note; requires a code edit to XenForo Enhanced Search to use painless rather than groovy.