Page MenuHomePhabricator

D14843.id35876.diff
No OneTemporary

D14843.id35876.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2193,7 +2193,7 @@
'PhabricatorEditField' => 'applications/transactions/editfield/PhabricatorEditField.php',
'PhabricatorEditType' => 'applications/transactions/edittype/PhabricatorEditType.php',
'PhabricatorEditor' => 'infrastructure/PhabricatorEditor.php',
- 'PhabricatorElasticSearchEngine' => 'applications/search/engine/PhabricatorElasticSearchEngine.php',
+ 'PhabricatorElasticFulltextStorageEngine' => 'applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php',
'PhabricatorElasticSearchSetupCheck' => 'applications/config/check/PhabricatorElasticSearchSetupCheck.php',
'PhabricatorEmailAddressesSettingsPanel' => 'applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php',
'PhabricatorEmailFormatSettingsPanel' => 'applications/settings/panel/PhabricatorEmailFormatSettingsPanel.php',
@@ -2332,6 +2332,7 @@
'PhabricatorFulltextEngineExtensionModule' => 'applications/search/index/PhabricatorFulltextEngineExtensionModule.php',
'PhabricatorFulltextIndexEngineExtension' => 'applications/search/engineextension/PhabricatorFulltextIndexEngineExtension.php',
'PhabricatorFulltextInterface' => 'applications/search/interface/PhabricatorFulltextInterface.php',
+ 'PhabricatorFulltextStorageEngine' => 'applications/search/fulltextstorage/PhabricatorFulltextStorageEngine.php',
'PhabricatorFundApplication' => 'applications/fund/application/PhabricatorFundApplication.php',
'PhabricatorGDSetupCheck' => 'applications/config/check/PhabricatorGDSetupCheck.php',
'PhabricatorGarbageCollector' => 'infrastructure/daemon/garbagecollector/PhabricatorGarbageCollector.php',
@@ -2540,7 +2541,7 @@
'PhabricatorMustVerifyEmailController' => 'applications/auth/controller/PhabricatorMustVerifyEmailController.php',
'PhabricatorMySQLConfigOptions' => 'applications/config/option/PhabricatorMySQLConfigOptions.php',
'PhabricatorMySQLFileStorageEngine' => 'applications/files/engine/PhabricatorMySQLFileStorageEngine.php',
- 'PhabricatorMySQLSearchEngine' => 'applications/search/engine/PhabricatorMySQLSearchEngine.php',
+ 'PhabricatorMySQLFulltextStorageEngine' => 'applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php',
'PhabricatorMySQLSetupCheck' => 'applications/config/check/PhabricatorMySQLSetupCheck.php',
'PhabricatorNamedQuery' => 'applications/search/storage/PhabricatorNamedQuery.php',
'PhabricatorNamedQueryQuery' => 'applications/search/query/PhabricatorNamedQueryQuery.php',
@@ -3032,7 +3033,6 @@
'PhabricatorSearchDocumentRelationship' => 'applications/search/storage/document/PhabricatorSearchDocumentRelationship.php',
'PhabricatorSearchDocumentTypeDatasource' => 'applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php',
'PhabricatorSearchEditController' => 'applications/search/controller/PhabricatorSearchEditController.php',
- 'PhabricatorSearchEngine' => 'applications/search/engine/PhabricatorSearchEngine.php',
'PhabricatorSearchEngineAPIMethod' => 'applications/search/engine/PhabricatorSearchEngineAPIMethod.php',
'PhabricatorSearchEngineAttachment' => 'applications/search/engineextension/PhabricatorSearchEngineAttachment.php',
'PhabricatorSearchEngineExtension' => 'applications/search/engineextension/PhabricatorSearchEngineExtension.php',
@@ -6395,7 +6395,7 @@
'PhabricatorEditField' => 'Phobject',
'PhabricatorEditType' => 'Phobject',
'PhabricatorEditor' => 'Phobject',
- 'PhabricatorElasticSearchEngine' => 'PhabricatorSearchEngine',
+ 'PhabricatorElasticFulltextStorageEngine' => 'PhabricatorFulltextStorageEngine',
'PhabricatorElasticSearchSetupCheck' => 'PhabricatorSetupCheck',
'PhabricatorEmailAddressesSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorEmailFormatSettingsPanel' => 'PhabricatorSettingsPanel',
@@ -6564,6 +6564,7 @@
'PhabricatorFulltextEngineExtension' => 'Phobject',
'PhabricatorFulltextEngineExtensionModule' => 'PhabricatorConfigModule',
'PhabricatorFulltextIndexEngineExtension' => 'PhabricatorIndexEngineExtension',
+ 'PhabricatorFulltextStorageEngine' => 'Phobject',
'PhabricatorFundApplication' => 'PhabricatorApplication',
'PhabricatorGDSetupCheck' => 'PhabricatorSetupCheck',
'PhabricatorGarbageCollector' => 'Phobject',
@@ -6787,7 +6788,7 @@
'PhabricatorMustVerifyEmailController' => 'PhabricatorAuthController',
'PhabricatorMySQLConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorMySQLFileStorageEngine' => 'PhabricatorFileStorageEngine',
- 'PhabricatorMySQLSearchEngine' => 'PhabricatorSearchEngine',
+ 'PhabricatorMySQLFulltextStorageEngine' => 'PhabricatorFulltextStorageEngine',
'PhabricatorMySQLSetupCheck' => 'PhabricatorSetupCheck',
'PhabricatorNamedQuery' => array(
'PhabricatorSearchDAO',
@@ -7395,7 +7396,6 @@
'PhabricatorSearchDocumentRelationship' => 'PhabricatorSearchDAO',
'PhabricatorSearchDocumentTypeDatasource' => 'PhabricatorTypeaheadDatasource',
'PhabricatorSearchEditController' => 'PhabricatorSearchBaseController',
- 'PhabricatorSearchEngine' => 'Phobject',
'PhabricatorSearchEngineAPIMethod' => 'ConduitAPIMethod',
'PhabricatorSearchEngineAttachment' => 'Phobject',
'PhabricatorSearchEngineExtension' => 'Phobject',
diff --git a/src/applications/config/check/PhabricatorElasticSearchSetupCheck.php b/src/applications/config/check/PhabricatorElasticSearchSetupCheck.php
--- a/src/applications/config/check/PhabricatorElasticSearchSetupCheck.php
+++ b/src/applications/config/check/PhabricatorElasticSearchSetupCheck.php
@@ -11,7 +11,7 @@
return;
}
- $engine = new PhabricatorElasticSearchEngine();
+ $engine = new PhabricatorElasticFulltextStorageEngine();
$index_exists = null;
$index_sane = null;
@@ -70,8 +70,8 @@
}
protected function shouldUseElasticSearchEngine() {
- $search_engine = PhabricatorSearchEngine::loadEngine();
- return ($search_engine instanceof PhabricatorElasticSearchEngine);
+ $search_engine = PhabricatorFulltextStorageEngine::loadEngine();
+ return ($search_engine instanceof PhabricatorElasticFulltextStorageEngine);
}
}
diff --git a/src/applications/config/check/PhabricatorMySQLSetupCheck.php b/src/applications/config/check/PhabricatorMySQLSetupCheck.php
--- a/src/applications/config/check/PhabricatorMySQLSetupCheck.php
+++ b/src/applications/config/check/PhabricatorMySQLSetupCheck.php
@@ -366,8 +366,8 @@
}
protected function shouldUseMySQLSearchEngine() {
- $search_engine = PhabricatorSearchEngine::loadEngine();
- return $search_engine instanceof PhabricatorMySQLSearchEngine;
+ $search_engine = PhabricatorFulltextStorageEngine::loadEngine();
+ return ($search_engine instanceof PhabricatorMySQLFulltextStorageEngine);
}
}
diff --git a/src/applications/maniphest/query/ManiphestTaskQuery.php b/src/applications/maniphest/query/ManiphestTaskQuery.php
--- a/src/applications/maniphest/query/ManiphestTaskQuery.php
+++ b/src/applications/maniphest/query/ManiphestTaskQuery.php
@@ -499,7 +499,7 @@
$fulltext_query->setParameter('types',
array(ManiphestTaskPHIDType::TYPECONST));
- $engine = PhabricatorSearchEngine::loadEngine();
+ $engine = PhabricatorFulltextStorageEngine::loadEngine();
$fulltext_results = $engine->executeSearch($fulltext_query);
if (empty($fulltext_results)) {
diff --git a/src/applications/search/applicationpanel/PhabricatorSearchApplicationStorageEnginePanel.php b/src/applications/search/applicationpanel/PhabricatorSearchApplicationStorageEnginePanel.php
--- a/src/applications/search/applicationpanel/PhabricatorSearchApplicationStorageEnginePanel.php
+++ b/src/applications/search/applicationpanel/PhabricatorSearchApplicationStorageEnginePanel.php
@@ -16,8 +16,8 @@
$viewer = $this->getViewer();
$application = $this->getApplication();
- $active_engine = PhabricatorSearchEngine::loadEngine();
- $engines = PhabricatorSearchEngine::loadAllEngines();
+ $active_engine = PhabricatorFulltextStorageEngine::loadEngine();
+ $engines = PhabricatorFulltextStorageEngine::loadAllEngines();
$rows = array();
$rowc = array();
diff --git a/src/applications/search/engine/__tests__/PhabricatorSearchEngineTestCase.php b/src/applications/search/engine/__tests__/PhabricatorSearchEngineTestCase.php
--- a/src/applications/search/engine/__tests__/PhabricatorSearchEngineTestCase.php
+++ b/src/applications/search/engine/__tests__/PhabricatorSearchEngineTestCase.php
@@ -3,7 +3,7 @@
final class PhabricatorSearchEngineTestCase extends PhabricatorTestCase {
public function testLoadAllEngines() {
- PhabricatorSearchEngine::loadAllEngines();
+ PhabricatorFulltextStorageEngine::loadAllEngines();
$this->assertTrue(true);
}
diff --git a/src/applications/search/engine/PhabricatorElasticSearchEngine.php b/src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
rename from src/applications/search/engine/PhabricatorElasticSearchEngine.php
rename to src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
--- a/src/applications/search/engine/PhabricatorElasticSearchEngine.php
+++ b/src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
@@ -1,6 +1,7 @@
<?php
-final class PhabricatorElasticSearchEngine extends PhabricatorSearchEngine {
+final class PhabricatorElasticFulltextStorageEngine
+ extends PhabricatorFulltextStorageEngine {
private $uri;
private $index;
diff --git a/src/applications/search/engine/PhabricatorSearchEngine.php b/src/applications/search/fulltextstorage/PhabricatorFulltextStorageEngine.php
rename from src/applications/search/engine/PhabricatorSearchEngine.php
rename to src/applications/search/fulltextstorage/PhabricatorFulltextStorageEngine.php
--- a/src/applications/search/engine/PhabricatorSearchEngine.php
+++ b/src/applications/search/fulltextstorage/PhabricatorFulltextStorageEngine.php
@@ -5,7 +5,7 @@
* three capabilities: indexing, searching, and reconstruction (this can be
* stubbed out if an engine can't reasonably do it, it is used for debugging).
*/
-abstract class PhabricatorSearchEngine extends Phobject {
+abstract class PhabricatorFulltextStorageEngine extends Phobject {
/* -( Engine Metadata )---------------------------------------------------- */
diff --git a/src/applications/search/engine/PhabricatorMySQLSearchEngine.php b/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
rename from src/applications/search/engine/PhabricatorMySQLSearchEngine.php
rename to src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
--- a/src/applications/search/engine/PhabricatorMySQLSearchEngine.php
+++ b/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
@@ -1,6 +1,7 @@
<?php
-final class PhabricatorMySQLSearchEngine extends PhabricatorSearchEngine {
+final class PhabricatorMySQLFulltextStorageEngine
+ extends PhabricatorFulltextStorageEngine {
public function getEngineIdentifier() {
return 'mysql';
diff --git a/src/applications/search/index/PhabricatorFulltextEngine.php b/src/applications/search/index/PhabricatorFulltextEngine.php
--- a/src/applications/search/index/PhabricatorFulltextEngine.php
+++ b/src/applications/search/index/PhabricatorFulltextEngine.php
@@ -40,7 +40,7 @@
$extension->indexFulltextObject($object, $document);
}
- $storage_engine = PhabricatorSearchEngine::loadEngine();
+ $storage_engine = PhabricatorFulltextStorageEngine::loadEngine();
$storage_engine->reindexAbstractDocument($document);
}
diff --git a/src/applications/search/management/PhabricatorSearchManagementInitWorkflow.php b/src/applications/search/management/PhabricatorSearchManagementInitWorkflow.php
--- a/src/applications/search/management/PhabricatorSearchManagementInitWorkflow.php
+++ b/src/applications/search/management/PhabricatorSearchManagementInitWorkflow.php
@@ -13,7 +13,7 @@
public function execute(PhutilArgumentParser $args) {
$console = PhutilConsole::getConsole();
- $engine = PhabricatorSearchEngine::loadEngine();
+ $engine = PhabricatorFulltextStorageEngine::loadEngine();
$work_done = false;
if (!$engine->indexExists()) {
diff --git a/src/applications/search/query/PhabricatorSearchDocumentQuery.php b/src/applications/search/query/PhabricatorSearchDocumentQuery.php
--- a/src/applications/search/query/PhabricatorSearchDocumentQuery.php
+++ b/src/applications/search/query/PhabricatorSearchDocumentQuery.php
@@ -74,7 +74,7 @@
->setParameter('offset', $this->getOffset())
->setParameter('limit', $this->getRawResultLimit());
- $engine = PhabricatorSearchEngine::loadEngine();
+ $engine = PhabricatorFulltextStorageEngine::loadEngine();
return $engine->executeSearch($query);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 2, 1:32 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6757054
Default Alt Text
D14843.id35876.diff (12 KB)

Event Timeline