Changed to using params to match the documentation from elasticsearch.