Fixed the ElasticSearchPersistWriter

making code smaller since 1998