Differential D17581 Diff 42302 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 522 Lines • ▼ Show 20 Lines | class PhabricatorElasticFulltextStorageEngine | ||||
public function getIndexStats(PhabricatorElasticSearchHost $host = null) { | public function getIndexStats(PhabricatorElasticSearchHost $host = null) { | ||||
if ($this->version < 2) { | if ($this->version < 2) { | ||||
return false; | return false; | ||||
} | } | ||||
if (!$host) { | if (!$host) { | ||||
$host = $this->getHostForRead(); | $host = $this->getHostForRead(); | ||||
} | } | ||||
$uri = '/_stats/'; | $uri = '/_stats/'; | ||||
$host = $this->getHostForRead(); | |||||
$res = $this->executeRequest($host, $uri, array()); | $res = $this->executeRequest($host, $uri, array()); | ||||
$stats = $res['indices'][$this->index]; | $stats = $res['indices'][$this->index]; | ||||
return array( | return array( | ||||
pht('Queries') => | pht('Queries') => | ||||
idxv($stats, array('primaries', 'search', 'query_total')), | idxv($stats, array('primaries', 'search', 'query_total')), | ||||
pht('Documents') => | pht('Documents') => | ||||
idxv($stats, array('total', 'docs', 'count')), | idxv($stats, array('total', 'docs', 'count')), | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |