@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+21 -27
+5 -5
src/__phutil_library_map__.php
··· 2655 2655 'PhabricatorEditorMultipleSetting' => 'applications/settings/setting/PhabricatorEditorMultipleSetting.php', 2656 2656 'PhabricatorEditorSetting' => 'applications/settings/setting/PhabricatorEditorSetting.php', 2657 2657 'PhabricatorElasticFulltextStorageEngine' => 'applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php', 2658 - 'PhabricatorElasticSearchHost' => 'infrastructure/cluster/search/PhabricatorElasticSearchHost.php', 2659 - 'PhabricatorElasticSearchQueryBuilder' => 'applications/search/fulltextstorage/PhabricatorElasticSearchQueryBuilder.php', 2660 - 'PhabricatorElasticSearchSetupCheck' => 'applications/config/check/PhabricatorElasticSearchSetupCheck.php', 2658 + 'PhabricatorElasticsearchHost' => 'infrastructure/cluster/search/PhabricatorElasticsearchHost.php', 2659 + 'PhabricatorElasticsearchQueryBuilder' => 'applications/search/fulltextstorage/PhabricatorElasticsearchQueryBuilder.php', 2660 + 'PhabricatorElasticsearchSetupCheck' => 'applications/config/check/PhabricatorElasticsearchSetupCheck.php', 2661 2661 'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php', 2662 2662 'PhabricatorEmailContentSource' => 'applications/metamta/contentsource/PhabricatorEmailContentSource.php', 2663 2663 'PhabricatorEmailDeliverySettingsPanel' => 'applications/settings/panel/PhabricatorEmailDeliverySettingsPanel.php', ··· 7750 7750 'PhabricatorEditorMultipleSetting' => 'PhabricatorSelectSetting', 7751 7751 'PhabricatorEditorSetting' => 'PhabricatorStringSetting', 7752 7752 'PhabricatorElasticFulltextStorageEngine' => 'PhabricatorFulltextStorageEngine', 7753 - 'PhabricatorElasticSearchHost' => 'PhabricatorSearchHost', 7754 - 'PhabricatorElasticSearchSetupCheck' => 'PhabricatorSetupCheck', 7753 + 'PhabricatorElasticsearchHost' => 'PhabricatorSearchHost', 7754 + 'PhabricatorElasticsearchSetupCheck' => 'PhabricatorSetupCheck', 7755 7755 'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel', 7756 7756 'PhabricatorEmailContentSource' => 'PhabricatorContentSource', 7757 7757 'PhabricatorEmailDeliverySettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
+2 -2
src/applications/config/check/PhabricatorElasticSearchSetupCheck.php src/applications/config/check/PhabricatorElasticsearchSetupCheck.php.lowercase
··· 1 1 <?php 2 2 3 - final class PhabricatorElasticSearchSetupCheck extends PhabricatorSetupCheck { 3 + final class PhabricatorElasticsearchSetupCheck extends PhabricatorSetupCheck { 4 4 5 5 public function getDefaultGroup() { 6 6 return self::GROUP_OTHER; ··· 16 16 // ignore the error 17 17 continue; 18 18 } 19 - if ($host instanceof PhabricatorElasticSearchHost) { 19 + if ($host instanceof PhabricatorElasticsearchHost) { 20 20 $index_exists = null; 21 21 $index_sane = null; 22 22 try {
+3 -3
src/applications/config/check/PhabricatorMySQLSetupCheck.php
··· 145 145 "be able to find search results for common words. You can gain ". 146 146 "access to this option by upgrading MySQL to a more recent ". 147 147 "version.\n\n". 148 - "You can ignore this warning if you plan to configure ElasticSearch ". 148 + "You can ignore this warning if you plan to configure Elasticsearch ". 149 149 "later, or aren't concerned about searching for common words.", 150 150 $host_name, 151 151 phutil_tag('tt', array(), 'ft_stopword_file')); ··· 180 180 "To make search more useful, you can use an alternate stopword ". 181 181 "file with fewer words. Alternatively, if you aren't concerned ". 182 182 "about searching for common words, you can ignore this warning. ". 183 - "If you later plan to configure ElasticSearch, you can also ignore ". 183 + "If you later plan to configure Elasticsearch, you can also ignore ". 184 184 "this warning: this stopword file only affects MySQL fulltext ". 185 185 "indexes.\n\n". 186 186 "To choose a different stopword file, add this to your %s file ". ··· 231 231 "You can change this setting to 3 to allow these words to be ". 232 232 "indexed. Alternatively, you can ignore this warning if you are ". 233 233 "not concerned about searching for 3-letter words. If you later ". 234 - "plan to configure ElasticSearch, you can also ignore this warning: ". 234 + "plan to configure Elasticsearch, you can also ignore this warning: ". 235 235 "only MySQL fulltext search is affected.\n\n". 236 236 "To reduce the minimum word length to 3, add this to your %s file ". 237 237 "(in the %s section) and then restart %s:\n\n".
+1 -1
src/applications/maniphest/query/ManiphestTaskQuery.php
··· 514 514 ->setParameter('query', $this->fullTextSearch); 515 515 516 516 // NOTE: Setting this to something larger than 10,000 will raise errors in 517 - // ElasticSearch, and billions of results won't fit in memory anyway. 517 + // Elasticsearch, and billions of results won't fit in memory anyway. 518 518 $fulltext_query->setParameter('limit', 10000); 519 519 $fulltext_query->setParameter('types', 520 520 array(ManiphestTaskPHIDType::TYPECONST));
+7 -13
src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
··· 32 32 } 33 33 34 34 public function getHostType() { 35 - return new PhabricatorElasticSearchHost($this); 35 + return new PhabricatorElasticsearchHost($this); 36 36 } 37 37 38 - /** 39 - * @return PhabricatorElasticSearchHost 40 - */ 41 38 public function getHostForRead() { 42 39 return $this->getService()->getAnyHostForRole('read'); 43 40 } 44 41 45 - /** 46 - * @return PhabricatorElasticSearchHost 47 - */ 48 42 public function getHostForWrite() { 49 43 return $this->getService()->getAnyHostForRole('write'); 50 44 } ··· 148 142 } 149 143 150 144 private function buildSpec(PhabricatorSavedQuery $query) { 151 - $q = new PhabricatorElasticSearchQueryBuilder('bool'); 145 + $q = new PhabricatorElasticsearchQueryBuilder('bool'); 152 146 $query_string = $query->getParameter('query'); 153 147 if (strlen($query_string)) { 154 148 $fields = $this->getTypeConstants('PhabricatorSearchDocumentFieldType'); ··· 305 299 $exceptions); 306 300 } 307 301 308 - public function indexExists(PhabricatorElasticSearchHost $host = null) { 302 + public function indexExists(PhabricatorElasticsearchHost $host = null) { 309 303 if (!$host) { 310 304 $host = $this->getHostForRead(); 311 305 } ··· 439 433 return $data; 440 434 } 441 435 442 - public function indexIsSane(PhabricatorElasticSearchHost $host = null) { 436 + public function indexIsSane(PhabricatorElasticsearchHost $host = null) { 443 437 if (!$host) { 444 438 $host = $this->getHostForRead(); 445 439 } ··· 518 512 $this->executeRequest($host, '/', $data, 'PUT'); 519 513 } 520 514 521 - public function getIndexStats(PhabricatorElasticSearchHost $host = null) { 515 + public function getIndexStats(PhabricatorElasticsearchHost $host = null) { 522 516 if ($this->version < 2) { 523 517 return false; 524 518 } ··· 542 536 ); 543 537 } 544 538 545 - private function executeRequest(PhabricatorElasticSearchHost $host, $path, 539 + private function executeRequest(PhabricatorElasticsearchHost $host, $path, 546 540 array $data, $method = 'GET') { 547 541 548 542 $uri = $host->getURI($path); ··· 576 570 } catch (PhutilJSONParserException $ex) { 577 571 $host->didHealthCheck(false); 578 572 throw new PhutilProxyException( 579 - pht('ElasticSearch server returned invalid JSON!'), 573 + pht('Elasticsearch server returned invalid JSON!'), 580 574 $ex); 581 575 } 582 576
+1 -1
src/applications/search/fulltextstorage/PhabricatorElasticSearchQueryBuilder.php src/applications/search/fulltextstorage/PhabricatorElasticsearchQueryBuilder.php.lowercase
··· 1 1 <?php 2 2 3 - class PhabricatorElasticSearchQueryBuilder { 3 + class PhabricatorElasticsearchQueryBuilder { 4 4 protected $name; 5 5 protected $clauses = array(); 6 6
+2 -2
src/infrastructure/cluster/search/PhabricatorElasticSearchHost.php src/infrastructure/cluster/search/PhabricatorElasticsearchHost.php.lowercase
··· 1 1 <?php 2 2 3 - final class PhabricatorElasticSearchHost 3 + final class PhabricatorElasticsearchHost 4 4 extends PhabricatorSearchHost { 5 5 6 6 private $version = 5; ··· 21 21 } 22 22 23 23 public function getDisplayName() { 24 - return pht('ElasticSearch'); 24 + return pht('Elasticsearch'); 25 25 } 26 26 27 27 public function getStatusViewColumns() {