I don't understand why this is needed, but I left it in as it was part of the example code in https://github.com/elasticsearch/elasticsearch-rails/issues/10