Remove a small bit of duplication in ElasticRequestFactory