Differential D17578 Diff 42289 src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
| Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Lines | foreach ($this->service->getAllHostsForRole('read') as $host) { | ||||
| try { | try { | ||||
| $response = $this->executeRequest($host, $uri, $spec); | $response = $this->executeRequest($host, $uri, $spec); | ||||
| $phids = ipull($response['hits']['hits'], '_id'); | $phids = ipull($response['hits']['hits'], '_id'); | ||||
| return $phids; | return $phids; | ||||
| } catch (Exception $e) { | } catch (Exception $e) { | ||||
| $exceptions[] = $e; | $exceptions[] = $e; | ||||
| } | } | ||||
| } | } | ||||
| throw new PhutilAggregateException('All search hosts failed:', $exceptions); | throw new PhutilAggregateException(pht('All Fulltext Search hosts failed:'), | ||||
| $exceptions); | |||||
| } | } | ||||
| public function indexExists(PhabricatorElasticSearchHost $host = null) { | public function indexExists(PhabricatorElasticSearchHost $host = null) { | ||||
| if (!$host) { | if (!$host) { | ||||
| $host = $this->getHostForRead(); | $host = $this->getHostForRead(); | ||||
| } | } | ||||
| try { | try { | ||||
| if ($this->version >= 5) { | if ($this->version >= 5) { | ||||
| ▲ Show 20 Lines • Show All 271 Lines • Show Last 20 Lines | |||||