I calculate a script field (a little performance-expensive) when search, an then I want to reference the script field value in a script sort. I seems elasticsearch not support it now, I can only reference the doc field value in a script sort.
Or I want to reference the script field value in a script_score script, then at the sorting phase I just use the _score value. But It seems I cant reference the script field value in a script_score script too.
Is there some advice to achieve it?