Cache the elasticsearch client so that it is reused rather than a new one created each time it's requested.