mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 05:42:40 +01:00
Rename PhabricatorSearchEngine subclasses
Summary: Ref T5655. Rename `PhabricatorSearchEngine` subclasses for consistency. Test Plan: `arc unit` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T5655 Differential Revision: https://secure.phabricator.com/D12669
This commit is contained in:
parent
791de0886f
commit
81d051dbfa
4 changed files with 8 additions and 8 deletions
|
@ -1771,6 +1771,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorEdgeTestCase' => 'infrastructure/edges/__tests__/PhabricatorEdgeTestCase.php',
|
'PhabricatorEdgeTestCase' => 'infrastructure/edges/__tests__/PhabricatorEdgeTestCase.php',
|
||||||
'PhabricatorEdgeType' => 'infrastructure/edges/type/PhabricatorEdgeType.php',
|
'PhabricatorEdgeType' => 'infrastructure/edges/type/PhabricatorEdgeType.php',
|
||||||
'PhabricatorEditor' => 'infrastructure/PhabricatorEditor.php',
|
'PhabricatorEditor' => 'infrastructure/PhabricatorEditor.php',
|
||||||
|
'PhabricatorElasticSearchEngine' => 'applications/search/engine/PhabricatorElasticSearchEngine.php',
|
||||||
'PhabricatorElasticSetupCheck' => 'applications/config/check/PhabricatorElasticSetupCheck.php',
|
'PhabricatorElasticSetupCheck' => 'applications/config/check/PhabricatorElasticSetupCheck.php',
|
||||||
'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php',
|
'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php',
|
||||||
'PhabricatorEmailFormatSettingsPanel' => 'applications/settings/panel/PhabricatorEmailFormatSettingsPanel.php',
|
'PhabricatorEmailFormatSettingsPanel' => 'applications/settings/panel/PhabricatorEmailFormatSettingsPanel.php',
|
||||||
|
@ -2081,6 +2082,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorMustVerifyEmailController' => 'applications/auth/controller/PhabricatorMustVerifyEmailController.php',
|
'PhabricatorMustVerifyEmailController' => 'applications/auth/controller/PhabricatorMustVerifyEmailController.php',
|
||||||
'PhabricatorMySQLConfigOptions' => 'applications/config/option/PhabricatorMySQLConfigOptions.php',
|
'PhabricatorMySQLConfigOptions' => 'applications/config/option/PhabricatorMySQLConfigOptions.php',
|
||||||
'PhabricatorMySQLFileStorageEngine' => 'applications/files/engine/PhabricatorMySQLFileStorageEngine.php',
|
'PhabricatorMySQLFileStorageEngine' => 'applications/files/engine/PhabricatorMySQLFileStorageEngine.php',
|
||||||
|
'PhabricatorMySQLSearchEngine' => 'applications/search/engine/PhabricatorMySQLSearchEngine.php',
|
||||||
'PhabricatorMySQLSetupCheck' => 'applications/config/check/PhabricatorMySQLSetupCheck.php',
|
'PhabricatorMySQLSetupCheck' => 'applications/config/check/PhabricatorMySQLSetupCheck.php',
|
||||||
'PhabricatorNamedQuery' => 'applications/search/storage/PhabricatorNamedQuery.php',
|
'PhabricatorNamedQuery' => 'applications/search/storage/PhabricatorNamedQuery.php',
|
||||||
'PhabricatorNamedQueryQuery' => 'applications/search/query/PhabricatorNamedQueryQuery.php',
|
'PhabricatorNamedQueryQuery' => 'applications/search/query/PhabricatorNamedQueryQuery.php',
|
||||||
|
@ -2507,8 +2509,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSearchDocumentTypeDatasource' => 'applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php',
|
'PhabricatorSearchDocumentTypeDatasource' => 'applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php',
|
||||||
'PhabricatorSearchEditController' => 'applications/search/controller/PhabricatorSearchEditController.php',
|
'PhabricatorSearchEditController' => 'applications/search/controller/PhabricatorSearchEditController.php',
|
||||||
'PhabricatorSearchEngine' => 'applications/search/engine/PhabricatorSearchEngine.php',
|
'PhabricatorSearchEngine' => 'applications/search/engine/PhabricatorSearchEngine.php',
|
||||||
'PhabricatorSearchEngineElastic' => 'applications/search/engine/PhabricatorSearchEngineElastic.php',
|
|
||||||
'PhabricatorSearchEngineMySQL' => 'applications/search/engine/PhabricatorSearchEngineMySQL.php',
|
|
||||||
'PhabricatorSearchEngineSelector' => 'applications/search/selector/PhabricatorSearchEngineSelector.php',
|
'PhabricatorSearchEngineSelector' => 'applications/search/selector/PhabricatorSearchEngineSelector.php',
|
||||||
'PhabricatorSearchField' => 'applications/search/constants/PhabricatorSearchField.php',
|
'PhabricatorSearchField' => 'applications/search/constants/PhabricatorSearchField.php',
|
||||||
'PhabricatorSearchHovercardController' => 'applications/search/controller/PhabricatorSearchHovercardController.php',
|
'PhabricatorSearchHovercardController' => 'applications/search/controller/PhabricatorSearchHovercardController.php',
|
||||||
|
@ -5152,6 +5152,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorEdgeTestCase' => 'PhabricatorTestCase',
|
'PhabricatorEdgeTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorEdgeType' => 'Phobject',
|
'PhabricatorEdgeType' => 'Phobject',
|
||||||
'PhabricatorEditor' => 'Phobject',
|
'PhabricatorEditor' => 'Phobject',
|
||||||
|
'PhabricatorElasticSearchEngine' => 'PhabricatorSearchEngine',
|
||||||
'PhabricatorElasticSetupCheck' => 'PhabricatorSetupCheck',
|
'PhabricatorElasticSetupCheck' => 'PhabricatorSetupCheck',
|
||||||
'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel',
|
'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel',
|
||||||
'PhabricatorEmailFormatSettingsPanel' => 'PhabricatorSettingsPanel',
|
'PhabricatorEmailFormatSettingsPanel' => 'PhabricatorSettingsPanel',
|
||||||
|
@ -5477,6 +5478,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorMustVerifyEmailController' => 'PhabricatorAuthController',
|
'PhabricatorMustVerifyEmailController' => 'PhabricatorAuthController',
|
||||||
'PhabricatorMySQLConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
'PhabricatorMySQLConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||||
'PhabricatorMySQLFileStorageEngine' => 'PhabricatorFileStorageEngine',
|
'PhabricatorMySQLFileStorageEngine' => 'PhabricatorFileStorageEngine',
|
||||||
|
'PhabricatorMySQLSearchEngine' => 'PhabricatorSearchEngine',
|
||||||
'PhabricatorMySQLSetupCheck' => 'PhabricatorSetupCheck',
|
'PhabricatorMySQLSetupCheck' => 'PhabricatorSetupCheck',
|
||||||
'PhabricatorNamedQuery' => array(
|
'PhabricatorNamedQuery' => array(
|
||||||
'PhabricatorSearchDAO',
|
'PhabricatorSearchDAO',
|
||||||
|
@ -5967,8 +5969,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSearchDocumentRelationship' => 'PhabricatorSearchDAO',
|
'PhabricatorSearchDocumentRelationship' => 'PhabricatorSearchDAO',
|
||||||
'PhabricatorSearchDocumentTypeDatasource' => 'PhabricatorTypeaheadDatasource',
|
'PhabricatorSearchDocumentTypeDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||||
'PhabricatorSearchEditController' => 'PhabricatorSearchBaseController',
|
'PhabricatorSearchEditController' => 'PhabricatorSearchBaseController',
|
||||||
'PhabricatorSearchEngineElastic' => 'PhabricatorSearchEngine',
|
|
||||||
'PhabricatorSearchEngineMySQL' => 'PhabricatorSearchEngine',
|
|
||||||
'PhabricatorSearchHovercardController' => 'PhabricatorSearchBaseController',
|
'PhabricatorSearchHovercardController' => 'PhabricatorSearchBaseController',
|
||||||
'PhabricatorSearchManagementIndexWorkflow' => 'PhabricatorSearchManagementWorkflow',
|
'PhabricatorSearchManagementIndexWorkflow' => 'PhabricatorSearchManagementWorkflow',
|
||||||
'PhabricatorSearchManagementInitWorkflow' => 'PhabricatorSearchManagementWorkflow',
|
'PhabricatorSearchManagementInitWorkflow' => 'PhabricatorSearchManagementWorkflow',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorSearchEngineElastic extends PhabricatorSearchEngine {
|
final class PhabricatorElasticSearchEngine extends PhabricatorSearchEngine {
|
||||||
private $uri;
|
private $uri;
|
||||||
private $index;
|
private $index;
|
||||||
private $timeout;
|
private $timeout;
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorSearchEngineMySQL extends PhabricatorSearchEngine {
|
final class PhabricatorMySQLSearchEngine extends PhabricatorSearchEngine {
|
||||||
|
|
||||||
public function reindexAbstractDocument(
|
public function reindexAbstractDocument(
|
||||||
PhabricatorSearchAbstractDocument $doc) {
|
PhabricatorSearchAbstractDocument $doc) {
|
|
@ -7,9 +7,9 @@ final class PhabricatorDefaultSearchEngineSelector
|
||||||
if (self::shouldUseElasticSearch()) {
|
if (self::shouldUseElasticSearch()) {
|
||||||
$elastic_host = PhabricatorEnv::getEnvConfig('search.elastic.host');
|
$elastic_host = PhabricatorEnv::getEnvConfig('search.elastic.host');
|
||||||
$elastic_index = PhabricatorEnv::getEnvConfig('search.elastic.namespace');
|
$elastic_index = PhabricatorEnv::getEnvConfig('search.elastic.namespace');
|
||||||
return new PhabricatorSearchEngineElastic($elastic_host, $elastic_index);
|
return new PhabricatorElasticSearchEngine($elastic_host, $elastic_index);
|
||||||
}
|
}
|
||||||
return new PhabricatorSearchEngineMySQL();
|
return new PhabricatorMySQLSearchEngine();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function shouldUseElasticSearch() {
|
public static function shouldUseElasticSearch() {
|
||||||
|
|
Loading…
Reference in a new issue