Dimitris Athanasiou e0489fc328
[7.x][ML] Always refresh dest index before starting analytics process () ()
If a job stops right after reindexing is finished but before
we refresh the destination index, we don't refresh at all.
If the job is started again right after, it jumps into the analyzing state.
However, the data is still not searchable.
This is why we were seeing test failures that we start the process
expecting X rows (where X is lower than the expected number of docs)
and we end up getting X+.

We fix this by moving the refresh of the dest index right before
we start the process so it always ensures the data is searchable.

Closes 

Backport of 
2019-10-17 17:20:19 +01:00
..