Updated ElasticSearch disabling.

Updated logic relating to the ability to disable ElasticSearch.