Fixing another error in ElasticSearch

It's like the author hadn't written tests at all!