How to sort results based on term position in elas

2019-07-05 08:09发布

问题:

Since _index is no longer available in Painless scripting, hence solutions which used to work via accessing term-offset from _index in script_score do not work any more such as one advised here: Scoring by term position in ElasticSearch?.

What's the preferred way to do this now?

Thanks much for your help!