1279 es upgrade

Changes to make ENCODE application to work with ElasticSearch 1.0 n higher versions.