1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 19:22:42 +01:00

Spell "Elasticsearch" correctly, not "ElasticSearch"

Summary: Ref T12450. These are like 95% my fault, but Elastic appears to spell the name "Elasticsearch" consistently in their branding.

Test Plan: `grep ElasticSearch`

Reviewers: chad, 20after4

Maniphest Tasks: T12450

Differential Revision: https://secure.phabricator.com/D17601
This commit is contained in:
epriestley 2017-04-02 12:03:28 -07:00
parent 304d19f92a
commit a9e2732a5c
7 changed files with 21 additions and 27 deletions

View file

@ -2655,9 +2655,9 @@ phutil_register_library_map(array(
'PhabricatorEditorMultipleSetting' => 'applications/settings/setting/PhabricatorEditorMultipleSetting.php', 'PhabricatorEditorMultipleSetting' => 'applications/settings/setting/PhabricatorEditorMultipleSetting.php',
'PhabricatorEditorSetting' => 'applications/settings/setting/PhabricatorEditorSetting.php', 'PhabricatorEditorSetting' => 'applications/settings/setting/PhabricatorEditorSetting.php',
'PhabricatorElasticFulltextStorageEngine' => 'applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php', 'PhabricatorElasticFulltextStorageEngine' => 'applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php',
'PhabricatorElasticSearchHost' => 'infrastructure/cluster/search/PhabricatorElasticSearchHost.php', 'PhabricatorElasticsearchHost' => 'infrastructure/cluster/search/PhabricatorElasticsearchHost.php',
'PhabricatorElasticSearchQueryBuilder' => 'applications/search/fulltextstorage/PhabricatorElasticSearchQueryBuilder.php', 'PhabricatorElasticsearchQueryBuilder' => 'applications/search/fulltextstorage/PhabricatorElasticsearchQueryBuilder.php',
'PhabricatorElasticSearchSetupCheck' => 'applications/config/check/PhabricatorElasticSearchSetupCheck.php', 'PhabricatorElasticsearchSetupCheck' => 'applications/config/check/PhabricatorElasticsearchSetupCheck.php',
'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php', 'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php',
'PhabricatorEmailContentSource' => 'applications/metamta/contentsource/PhabricatorEmailContentSource.php', 'PhabricatorEmailContentSource' => 'applications/metamta/contentsource/PhabricatorEmailContentSource.php',
'PhabricatorEmailDeliverySettingsPanel' => 'applications/settings/panel/PhabricatorEmailDeliverySettingsPanel.php', 'PhabricatorEmailDeliverySettingsPanel' => 'applications/settings/panel/PhabricatorEmailDeliverySettingsPanel.php',
@ -7750,8 +7750,8 @@ phutil_register_library_map(array(
'PhabricatorEditorMultipleSetting' => 'PhabricatorSelectSetting', 'PhabricatorEditorMultipleSetting' => 'PhabricatorSelectSetting',
'PhabricatorEditorSetting' => 'PhabricatorStringSetting', 'PhabricatorEditorSetting' => 'PhabricatorStringSetting',
'PhabricatorElasticFulltextStorageEngine' => 'PhabricatorFulltextStorageEngine', 'PhabricatorElasticFulltextStorageEngine' => 'PhabricatorFulltextStorageEngine',
'PhabricatorElasticSearchHost' => 'PhabricatorSearchHost', 'PhabricatorElasticsearchHost' => 'PhabricatorSearchHost',
'PhabricatorElasticSearchSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorElasticsearchSetupCheck' => 'PhabricatorSetupCheck',
'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorEmailContentSource' => 'PhabricatorContentSource', 'PhabricatorEmailContentSource' => 'PhabricatorContentSource',
'PhabricatorEmailDeliverySettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorEmailDeliverySettingsPanel' => 'PhabricatorEditEngineSettingsPanel',

View file

@ -1,6 +1,6 @@
<?php <?php
final class PhabricatorElasticSearchSetupCheck extends PhabricatorSetupCheck { final class PhabricatorElasticsearchSetupCheck extends PhabricatorSetupCheck {
public function getDefaultGroup() { public function getDefaultGroup() {
return self::GROUP_OTHER; return self::GROUP_OTHER;
@ -16,7 +16,7 @@ final class PhabricatorElasticSearchSetupCheck extends PhabricatorSetupCheck {
// ignore the error // ignore the error
continue; continue;
} }
if ($host instanceof PhabricatorElasticSearchHost) { if ($host instanceof PhabricatorElasticsearchHost) {
$index_exists = null; $index_exists = null;
$index_sane = null; $index_sane = null;
try { try {

View file

@ -145,7 +145,7 @@ final class PhabricatorMySQLSetupCheck extends PhabricatorSetupCheck {
"be able to find search results for common words. You can gain ". "be able to find search results for common words. You can gain ".
"access to this option by upgrading MySQL to a more recent ". "access to this option by upgrading MySQL to a more recent ".
"version.\n\n". "version.\n\n".
"You can ignore this warning if you plan to configure ElasticSearch ". "You can ignore this warning if you plan to configure Elasticsearch ".
"later, or aren't concerned about searching for common words.", "later, or aren't concerned about searching for common words.",
$host_name, $host_name,
phutil_tag('tt', array(), 'ft_stopword_file')); phutil_tag('tt', array(), 'ft_stopword_file'));
@ -180,7 +180,7 @@ final class PhabricatorMySQLSetupCheck extends PhabricatorSetupCheck {
"To make search more useful, you can use an alternate stopword ". "To make search more useful, you can use an alternate stopword ".
"file with fewer words. Alternatively, if you aren't concerned ". "file with fewer words. Alternatively, if you aren't concerned ".
"about searching for common words, you can ignore this warning. ". "about searching for common words, you can ignore this warning. ".
"If you later plan to configure ElasticSearch, you can also ignore ". "If you later plan to configure Elasticsearch, you can also ignore ".
"this warning: this stopword file only affects MySQL fulltext ". "this warning: this stopword file only affects MySQL fulltext ".
"indexes.\n\n". "indexes.\n\n".
"To choose a different stopword file, add this to your %s file ". "To choose a different stopword file, add this to your %s file ".
@ -231,7 +231,7 @@ final class PhabricatorMySQLSetupCheck extends PhabricatorSetupCheck {
"You can change this setting to 3 to allow these words to be ". "You can change this setting to 3 to allow these words to be ".
"indexed. Alternatively, you can ignore this warning if you are ". "indexed. Alternatively, you can ignore this warning if you are ".
"not concerned about searching for 3-letter words. If you later ". "not concerned about searching for 3-letter words. If you later ".
"plan to configure ElasticSearch, you can also ignore this warning: ". "plan to configure Elasticsearch, you can also ignore this warning: ".
"only MySQL fulltext search is affected.\n\n". "only MySQL fulltext search is affected.\n\n".
"To reduce the minimum word length to 3, add this to your %s file ". "To reduce the minimum word length to 3, add this to your %s file ".
"(in the %s section) and then restart %s:\n\n". "(in the %s section) and then restart %s:\n\n".

View file

@ -514,7 +514,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
->setParameter('query', $this->fullTextSearch); ->setParameter('query', $this->fullTextSearch);
// NOTE: Setting this to something larger than 10,000 will raise errors in // NOTE: Setting this to something larger than 10,000 will raise errors in
// ElasticSearch, and billions of results won't fit in memory anyway. // Elasticsearch, and billions of results won't fit in memory anyway.
$fulltext_query->setParameter('limit', 10000); $fulltext_query->setParameter('limit', 10000);
$fulltext_query->setParameter('types', $fulltext_query->setParameter('types',
array(ManiphestTaskPHIDType::TYPECONST)); array(ManiphestTaskPHIDType::TYPECONST));

View file

@ -32,19 +32,13 @@ class PhabricatorElasticFulltextStorageEngine
} }
public function getHostType() { public function getHostType() {
return new PhabricatorElasticSearchHost($this); return new PhabricatorElasticsearchHost($this);
} }
/**
* @return PhabricatorElasticSearchHost
*/
public function getHostForRead() { public function getHostForRead() {
return $this->getService()->getAnyHostForRole('read'); return $this->getService()->getAnyHostForRole('read');
} }
/**
* @return PhabricatorElasticSearchHost
*/
public function getHostForWrite() { public function getHostForWrite() {
return $this->getService()->getAnyHostForRole('write'); return $this->getService()->getAnyHostForRole('write');
} }
@ -148,7 +142,7 @@ class PhabricatorElasticFulltextStorageEngine
} }
private function buildSpec(PhabricatorSavedQuery $query) { private function buildSpec(PhabricatorSavedQuery $query) {
$q = new PhabricatorElasticSearchQueryBuilder('bool'); $q = new PhabricatorElasticsearchQueryBuilder('bool');
$query_string = $query->getParameter('query'); $query_string = $query->getParameter('query');
if (strlen($query_string)) { if (strlen($query_string)) {
$fields = $this->getTypeConstants('PhabricatorSearchDocumentFieldType'); $fields = $this->getTypeConstants('PhabricatorSearchDocumentFieldType');
@ -305,7 +299,7 @@ class PhabricatorElasticFulltextStorageEngine
$exceptions); $exceptions);
} }
public function indexExists(PhabricatorElasticSearchHost $host = null) { public function indexExists(PhabricatorElasticsearchHost $host = null) {
if (!$host) { if (!$host) {
$host = $this->getHostForRead(); $host = $this->getHostForRead();
} }
@ -439,7 +433,7 @@ class PhabricatorElasticFulltextStorageEngine
return $data; return $data;
} }
public function indexIsSane(PhabricatorElasticSearchHost $host = null) { public function indexIsSane(PhabricatorElasticsearchHost $host = null) {
if (!$host) { if (!$host) {
$host = $this->getHostForRead(); $host = $this->getHostForRead();
} }
@ -518,7 +512,7 @@ class PhabricatorElasticFulltextStorageEngine
$this->executeRequest($host, '/', $data, 'PUT'); $this->executeRequest($host, '/', $data, 'PUT');
} }
public function getIndexStats(PhabricatorElasticSearchHost $host = null) { public function getIndexStats(PhabricatorElasticsearchHost $host = null) {
if ($this->version < 2) { if ($this->version < 2) {
return false; return false;
} }
@ -542,7 +536,7 @@ class PhabricatorElasticFulltextStorageEngine
); );
} }
private function executeRequest(PhabricatorElasticSearchHost $host, $path, private function executeRequest(PhabricatorElasticsearchHost $host, $path,
array $data, $method = 'GET') { array $data, $method = 'GET') {
$uri = $host->getURI($path); $uri = $host->getURI($path);
@ -576,7 +570,7 @@ class PhabricatorElasticFulltextStorageEngine
} catch (PhutilJSONParserException $ex) { } catch (PhutilJSONParserException $ex) {
$host->didHealthCheck(false); $host->didHealthCheck(false);
throw new PhutilProxyException( throw new PhutilProxyException(
pht('ElasticSearch server returned invalid JSON!'), pht('Elasticsearch server returned invalid JSON!'),
$ex); $ex);
} }

View file

@ -1,6 +1,6 @@
<?php <?php
class PhabricatorElasticSearchQueryBuilder { class PhabricatorElasticsearchQueryBuilder {
protected $name; protected $name;
protected $clauses = array(); protected $clauses = array();

View file

@ -1,6 +1,6 @@
<?php <?php
final class PhabricatorElasticSearchHost final class PhabricatorElasticsearchHost
extends PhabricatorSearchHost { extends PhabricatorSearchHost {
private $version = 5; private $version = 5;
@ -21,7 +21,7 @@ final class PhabricatorElasticSearchHost
} }
public function getDisplayName() { public function getDisplayName() {
return pht('ElasticSearch'); return pht('Elasticsearch');
} }
public function getStatusViewColumns() { public function getStatusViewColumns() {