diff --git a/src/applications/search/engine/PhabricatorElasticSearchEngine.php b/src/applications/search/engine/PhabricatorElasticSearchEngine.php --- a/src/applications/search/engine/PhabricatorElasticSearchEngine.php +++ b/src/applications/search/engine/PhabricatorElasticSearchEngine.php @@ -6,6 +6,11 @@ private $index; private $timeout; + public function __construct() { + $this->uri = PhabricatorEnv::getEnvConfig('search.elastic.host'); + $this->index = PhabricatorEnv::getEnvConfig('search.elastic.namespace'); + } + public function getEngineIdentifier() { return 'elasticsearch'; } @@ -15,7 +20,7 @@ } public function isEnabled() { - return (bool)PhabricatorEnv::getEnvConfig('search.elastic.host'); + return (bool)$this->uri; } public function setURI($uri) {