Refactoring to update ElasticSearch index in postFush

https://github.com/FriendsOfSymfony/FOSElasticaBundle/issues/410