Revert "Simplify Elasticsearch initialization"

This reverts commit 68eacf5a5d45f0ece0f184dd5e74909f27daaeab.

I didn't mean for this to hit master yet.