Use codecs to decode the output from elasticsearch