Rewrite_time in _search takes a lot longer after upgrading from 6.4.2 to 6.8.2

We recently upgraded our ES cluster from 6.4.2 to 6.8.2 without any changes to the data. One thing we notice is that the same search query takes a lot longer in 6.8.2, and after turning on profiling, we notice the significant time increase for rewrite_time. I couldn't find anything through the release notes that indicate this change in behavior.

Here's our query:
Here's the profiling section when running against the 6.4.2 cluster:
And here's the profiling section when running against the 6.8.2 cluster:

If someone could take a look into this we would really appreciate it. Thanks in advance!

Updated: we were able to pin-point what was causing the increase in rewrite time -- it was the field_value_factor function in the function_score query within the has_child query. When we change this to random_score, the rewrite time significantly decreased to the speed we were seeing on 6.4.2. However, we still don't know why this is happening so would love some input from the ES team.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.