Simplify the elasticsearch requests due to a comment by @fsteeg