Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15399064
D20549.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D20549.id.diff
View Options
diff --git a/resources/sql/autopatches/20161130.search.02.rebuild.php b/resources/sql/autopatches/20161130.search.02.rebuild.php
--- a/resources/sql/autopatches/20161130.search.02.rebuild.php
+++ b/resources/sql/autopatches/20161130.search.02.rebuild.php
@@ -1,34 +1,7 @@
<?php
+// See T11741. Long ago, in T11922, we switched from "MyISAM FULLTEXT" to
+// "InnoDB FULLTEXT". This migration prompted installs to rebuild the index.
-$use_mysql = false;
-
-$services = PhabricatorSearchService::getAllServices();
-foreach ($services as $service) {
- $engine = $service->getEngine();
- if ($engine instanceof PhabricatorMySQLFulltextStorageEngine) {
- $use_mysql = true;
- }
-}
-
-if ($use_mysql) {
- $field = new PhabricatorSearchDocumentField();
- $conn = $field->establishConnection('r');
-
- // We're only going to require this if the index isn't empty: if you're on a
- // fresh install, you don't have to do anything.
- $any_documents = queryfx_one(
- $conn,
- 'SELECT * FROM %T LIMIT 1',
- $field->getTableName());
-
- if ($any_documents) {
- try {
- id(new PhabricatorConfigManualActivity())
- ->setActivityType(PhabricatorConfigManualActivity::TYPE_REINDEX)
- ->save();
- } catch (AphrontDuplicateKeyQueryException $ex) {
- // If we've already noted that this activity is required, just move on.
- }
- }
-}
+// Later, in T12974, we switched from "InnoDB FULLTEXT" to "Ferret", mostly
+// mooting this. The underlying tables and engines were later removed entirely.
diff --git a/resources/sql/autopatches/20190523.myisam.01.documentfield.sql b/resources/sql/autopatches/20190523.myisam.01.documentfield.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20190523.myisam.01.documentfield.sql
@@ -0,0 +1 @@
+DROP TABLE IF EXISTS {$NAMESPACE}_search.search_documentfield;
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
@@ -4530,7 +4530,6 @@
'PhabricatorSearchDefaultController' => 'applications/search/controller/PhabricatorSearchDefaultController.php',
'PhabricatorSearchDeleteController' => 'applications/search/controller/PhabricatorSearchDeleteController.php',
'PhabricatorSearchDocument' => 'applications/search/storage/document/PhabricatorSearchDocument.php',
- 'PhabricatorSearchDocumentField' => 'applications/search/storage/document/PhabricatorSearchDocumentField.php',
'PhabricatorSearchDocumentFieldType' => 'applications/search/constants/PhabricatorSearchDocumentFieldType.php',
'PhabricatorSearchDocumentQuery' => 'applications/search/query/PhabricatorSearchDocumentQuery.php',
'PhabricatorSearchDocumentRelationship' => 'applications/search/storage/document/PhabricatorSearchDocumentRelationship.php',
@@ -10874,7 +10873,6 @@
'PhabricatorSearchDefaultController' => 'PhabricatorSearchBaseController',
'PhabricatorSearchDeleteController' => 'PhabricatorSearchBaseController',
'PhabricatorSearchDocument' => 'PhabricatorSearchDAO',
- 'PhabricatorSearchDocumentField' => 'PhabricatorSearchDAO',
'PhabricatorSearchDocumentFieldType' => 'Phobject',
'PhabricatorSearchDocumentQuery' => 'PhabricatorPolicyAwareQuery',
'PhabricatorSearchDocumentRelationship' => 'PhabricatorSearchDAO',
diff --git a/src/applications/search/storage/document/PhabricatorSearchDocumentField.php b/src/applications/search/storage/document/PhabricatorSearchDocumentField.php
deleted file mode 100644
--- a/src/applications/search/storage/document/PhabricatorSearchDocumentField.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-final class PhabricatorSearchDocumentField extends PhabricatorSearchDAO {
-
- protected $phidType;
- protected $field;
- protected $auxPHID;
- protected $corpus;
- protected $stemmedCorpus;
-
- protected function getConfiguration() {
- return array(
- self::CONFIG_TIMESTAMPS => false,
- self::CONFIG_IDS => self::IDS_MANUAL,
- self::CONFIG_COLUMN_SCHEMA => array(
- 'phidType' => 'text4',
- 'field' => 'text4',
- 'auxPHID' => 'phid?',
- 'corpus' => 'fulltext?',
- 'stemmedCorpus' => 'fulltext?',
- ),
- self::CONFIG_KEY_SCHEMA => array(
- 'key_phid' => null,
- 'phid' => array(
- 'columns' => array('phid'),
- ),
- 'key_corpus' => array(
- 'columns' => array('corpus', 'stemmedCorpus'),
- 'type' => 'FULLTEXT',
- ),
- ),
- ) + parent::getConfiguration();
- }
-
- public function getIDKey() {
- return 'phid';
- }
-
-}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 2:41 AM (4 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7245031
Default Alt Text
D20549.id.diff (4 KB)
Attached To
Mode
D20549: Remove the "search_documentfield" table
Attached
Detach File
Event Timeline
Log In to Comment