I searched many times and searched from a distance. I need to use script_scoreand return the distance that I need to use script_fields, but could not find a solution that would combine the two queries or common data between them. Therefore, I calculate the distance twice. How can I avoid calculating the distance twice and instead calculate it only once?
source
share