mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +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:
parent
304d19f92a
commit
a9e2732a5c
7 changed files with 21 additions and 27 deletions
|
@ -2655,9 +2655,9 @@ phutil_register_library_map(array(
|
|||
'PhabricatorEditorMultipleSetting' => 'applications/settings/setting/PhabricatorEditorMultipleSetting.php',
|
||||
'PhabricatorEditorSetting' => 'applications/settings/setting/PhabricatorEditorSetting.php',
|
||||
'PhabricatorElasticFulltextStorageEngine' => 'applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php',
|
||||
'PhabricatorElasticSearchHost' => 'infrastructure/cluster/search/PhabricatorElasticSearchHost.php',
|
||||
'PhabricatorElasticSearchQueryBuilder' => 'applications/search/fulltextstorage/PhabricatorElasticSearchQueryBuilder.php',
|
||||
'PhabricatorElasticSearchSetupCheck' => 'applications/config/check/PhabricatorElasticSearchSetupCheck.php',
|
||||
'PhabricatorElasticsearchHost' => 'infrastructure/cluster/search/PhabricatorElasticsearchHost.php',
|
||||
'PhabricatorElasticsearchQueryBuilder' => 'applications/search/fulltextstorage/PhabricatorElasticsearchQueryBuilder.php',
|
||||
'PhabricatorElasticsearchSetupCheck' => 'applications/config/check/PhabricatorElasticsearchSetupCheck.php',
|
||||
'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php',
|
||||
'PhabricatorEmailContentSource' => 'applications/metamta/contentsource/PhabricatorEmailContentSource.php',
|
||||
'PhabricatorEmailDeliverySettingsPanel' => 'applications/settings/panel/PhabricatorEmailDeliverySettingsPanel.php',
|
||||
|
@ -7750,8 +7750,8 @@ phutil_register_library_map(array(
|
|||
'PhabricatorEditorMultipleSetting' => 'PhabricatorSelectSetting',
|
||||
'PhabricatorEditorSetting' => 'PhabricatorStringSetting',
|
||||
'PhabricatorElasticFulltextStorageEngine' => 'PhabricatorFulltextStorageEngine',
|
||||
'PhabricatorElasticSearchHost' => 'PhabricatorSearchHost',
|
||||
'PhabricatorElasticSearchSetupCheck' => 'PhabricatorSetupCheck',
|
||||
'PhabricatorElasticsearchHost' => 'PhabricatorSearchHost',
|
||||
'PhabricatorElasticsearchSetupCheck' => 'PhabricatorSetupCheck',
|
||||
'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel',
|
||||
'PhabricatorEmailContentSource' => 'PhabricatorContentSource',
|
||||
'PhabricatorEmailDeliverySettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorElasticSearchSetupCheck extends PhabricatorSetupCheck {
|
||||
final class PhabricatorElasticsearchSetupCheck extends PhabricatorSetupCheck {
|
||||
|
||||
public function getDefaultGroup() {
|
||||
return self::GROUP_OTHER;
|
||||
|
@ -16,7 +16,7 @@ final class PhabricatorElasticSearchSetupCheck extends PhabricatorSetupCheck {
|
|||
// ignore the error
|
||||
continue;
|
||||
}
|
||||
if ($host instanceof PhabricatorElasticSearchHost) {
|
||||
if ($host instanceof PhabricatorElasticsearchHost) {
|
||||
$index_exists = null;
|
||||
$index_sane = null;
|
||||
try {
|
|
@ -145,7 +145,7 @@ final class PhabricatorMySQLSetupCheck extends PhabricatorSetupCheck {
|
|||
"be able to find search results for common words. You can gain ".
|
||||
"access to this option by upgrading MySQL to a more recent ".
|
||||
"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.",
|
||||
$host_name,
|
||||
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 ".
|
||||
"file with fewer words. Alternatively, if you aren't concerned ".
|
||||
"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 ".
|
||||
"indexes.\n\n".
|
||||
"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 ".
|
||||
"indexed. Alternatively, you can ignore this warning if you are ".
|
||||
"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".
|
||||
"To reduce the minimum word length to 3, add this to your %s file ".
|
||||
"(in the %s section) and then restart %s:\n\n".
|
||||
|
|
|
@ -514,7 +514,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
|||
->setParameter('query', $this->fullTextSearch);
|
||||
|
||||
// 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('types',
|
||||
array(ManiphestTaskPHIDType::TYPECONST));
|
||||
|
|
|
@ -32,19 +32,13 @@ class PhabricatorElasticFulltextStorageEngine
|
|||
}
|
||||
|
||||
public function getHostType() {
|
||||
return new PhabricatorElasticSearchHost($this);
|
||||
return new PhabricatorElasticsearchHost($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PhabricatorElasticSearchHost
|
||||
*/
|
||||
public function getHostForRead() {
|
||||
return $this->getService()->getAnyHostForRole('read');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PhabricatorElasticSearchHost
|
||||
*/
|
||||
public function getHostForWrite() {
|
||||
return $this->getService()->getAnyHostForRole('write');
|
||||
}
|
||||
|
@ -148,7 +142,7 @@ class PhabricatorElasticFulltextStorageEngine
|
|||
}
|
||||
|
||||
private function buildSpec(PhabricatorSavedQuery $query) {
|
||||
$q = new PhabricatorElasticSearchQueryBuilder('bool');
|
||||
$q = new PhabricatorElasticsearchQueryBuilder('bool');
|
||||
$query_string = $query->getParameter('query');
|
||||
if (strlen($query_string)) {
|
||||
$fields = $this->getTypeConstants('PhabricatorSearchDocumentFieldType');
|
||||
|
@ -305,7 +299,7 @@ class PhabricatorElasticFulltextStorageEngine
|
|||
$exceptions);
|
||||
}
|
||||
|
||||
public function indexExists(PhabricatorElasticSearchHost $host = null) {
|
||||
public function indexExists(PhabricatorElasticsearchHost $host = null) {
|
||||
if (!$host) {
|
||||
$host = $this->getHostForRead();
|
||||
}
|
||||
|
@ -439,7 +433,7 @@ class PhabricatorElasticFulltextStorageEngine
|
|||
return $data;
|
||||
}
|
||||
|
||||
public function indexIsSane(PhabricatorElasticSearchHost $host = null) {
|
||||
public function indexIsSane(PhabricatorElasticsearchHost $host = null) {
|
||||
if (!$host) {
|
||||
$host = $this->getHostForRead();
|
||||
}
|
||||
|
@ -518,7 +512,7 @@ class PhabricatorElasticFulltextStorageEngine
|
|||
$this->executeRequest($host, '/', $data, 'PUT');
|
||||
}
|
||||
|
||||
public function getIndexStats(PhabricatorElasticSearchHost $host = null) {
|
||||
public function getIndexStats(PhabricatorElasticsearchHost $host = null) {
|
||||
if ($this->version < 2) {
|
||||
return false;
|
||||
}
|
||||
|
@ -542,7 +536,7 @@ class PhabricatorElasticFulltextStorageEngine
|
|||
);
|
||||
}
|
||||
|
||||
private function executeRequest(PhabricatorElasticSearchHost $host, $path,
|
||||
private function executeRequest(PhabricatorElasticsearchHost $host, $path,
|
||||
array $data, $method = 'GET') {
|
||||
|
||||
$uri = $host->getURI($path);
|
||||
|
@ -576,7 +570,7 @@ class PhabricatorElasticFulltextStorageEngine
|
|||
} catch (PhutilJSONParserException $ex) {
|
||||
$host->didHealthCheck(false);
|
||||
throw new PhutilProxyException(
|
||||
pht('ElasticSearch server returned invalid JSON!'),
|
||||
pht('Elasticsearch server returned invalid JSON!'),
|
||||
$ex);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
class PhabricatorElasticSearchQueryBuilder {
|
||||
class PhabricatorElasticsearchQueryBuilder {
|
||||
protected $name;
|
||||
protected $clauses = array();
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorElasticSearchHost
|
||||
final class PhabricatorElasticsearchHost
|
||||
extends PhabricatorSearchHost {
|
||||
|
||||
private $version = 5;
|
||||
|
@ -21,7 +21,7 @@ final class PhabricatorElasticSearchHost
|
|||
}
|
||||
|
||||
public function getDisplayName() {
|
||||
return pht('ElasticSearch');
|
||||
return pht('Elasticsearch');
|
||||
}
|
||||
|
||||
public function getStatusViewColumns() {
|
Loading…
Reference in a new issue