@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.

Convert Ponder Questions to Ferret engine

Summary: See PHI177. Ref T12974. PonderQuestion was overlooked during the Ferret engine conversions.

Test Plan:
Ran migrations, searched for questions, got results:

{F5241185}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12974

Differential Revision: https://secure.phabricator.com/D18736

+72 -1
+9
resources/sql/autopatches/20171026.ferret.01.ponder.doc.sql
··· 1 + CREATE TABLE {$NAMESPACE}_ponder.ponder_question_fdocument ( 2 + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 3 + objectPHID VARBINARY(64) NOT NULL, 4 + isClosed BOOL NOT NULL, 5 + authorPHID VARBINARY(64), 6 + ownerPHID VARBINARY(64), 7 + epochCreated INT UNSIGNED NOT NULL, 8 + epochModified INT UNSIGNED NOT NULL 9 + ) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
+8
resources/sql/autopatches/20171026.ferret.02.ponder.field.sql
··· 1 + CREATE TABLE {$NAMESPACE}_ponder.ponder_question_ffield ( 2 + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 3 + documentID INT UNSIGNED NOT NULL, 4 + fieldKey VARCHAR(4) NOT NULL COLLATE {$COLLATE_TEXT}, 5 + rawCorpus LONGTEXT NOT NULL COLLATE {$COLLATE_SORT}, 6 + termCorpus LONGTEXT NOT NULL COLLATE {$COLLATE_SORT}, 7 + normalCorpus LONGTEXT NOT NULL COLLATE {$COLLATE_SORT} 8 + ) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
+5
resources/sql/autopatches/20171026.ferret.03.ponder.ngrams.sql
··· 1 + CREATE TABLE {$NAMESPACE}_ponder.ponder_question_fngrams ( 2 + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 3 + documentID INT UNSIGNED NOT NULL, 4 + ngram CHAR(3) NOT NULL COLLATE {$COLLATE_TEXT} 5 + ) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
+7
resources/sql/autopatches/20171026.ferret.04.ponder.cngrams.sql
··· 1 + CREATE TABLE {$NAMESPACE}_ponder.ponder_question_fngrams_common ( 2 + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 3 + ngram CHAR(3) NOT NULL COLLATE {$COLLATE_TEXT}, 4 + needsCollection BOOL NOT NULL, 5 + UNIQUE KEY `key_ngram` (ngram), 6 + KEY `key_collect` (needsCollection) 7 + ) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
+11
resources/sql/autopatches/20171026.ferret.05.ponder.index.php
··· 1 + <?php 2 + 3 + $table = new PonderQuestion(); 4 + 5 + foreach (new LiskMigrationIterator($table) as $question) { 6 + PhabricatorSearchWorker::queueDocumentForIndexing( 7 + $question->getPHID(), 8 + array( 9 + 'force' => true, 10 + )); 11 + }
+3
src/__phutil_library_map__.php
··· 4774 4774 'PonderQuestionEditController' => 'applications/ponder/controller/PonderQuestionEditController.php', 4775 4775 'PonderQuestionEditEngine' => 'applications/ponder/editor/PonderQuestionEditEngine.php', 4776 4776 'PonderQuestionEditor' => 'applications/ponder/editor/PonderQuestionEditor.php', 4777 + 'PonderQuestionFerretEngine' => 'applications/ponder/search/PonderQuestionFerretEngine.php', 4777 4778 'PonderQuestionFulltextEngine' => 'applications/ponder/search/PonderQuestionFulltextEngine.php', 4778 4779 'PonderQuestionHistoryController' => 'applications/ponder/controller/PonderQuestionHistoryController.php', 4779 4780 'PonderQuestionListController' => 'applications/ponder/controller/PonderQuestionListController.php', ··· 10539 10540 'PhabricatorDestructibleInterface', 10540 10541 'PhabricatorSpacesInterface', 10541 10542 'PhabricatorFulltextInterface', 10543 + 'PhabricatorFerretInterface', 10542 10544 ), 10543 10545 'PonderQuestionAnswerTransaction' => 'PonderQuestionTransactionType', 10544 10546 'PonderQuestionAnswerWikiTransaction' => 'PonderQuestionTransactionType', ··· 10548 10550 'PonderQuestionEditController' => 'PonderController', 10549 10551 'PonderQuestionEditEngine' => 'PhabricatorEditEngine', 10550 10552 'PonderQuestionEditor' => 'PonderEditor', 10553 + 'PonderQuestionFerretEngine' => 'PhabricatorFerretEngine', 10551 10554 'PonderQuestionFulltextEngine' => 'PhabricatorFulltextEngine', 10552 10555 'PonderQuestionHistoryController' => 'PonderController', 10553 10556 'PonderQuestionListController' => 'PonderController',
+18
src/applications/ponder/search/PonderQuestionFerretEngine.php
··· 1 + <?php 2 + 3 + final class PonderQuestionFerretEngine 4 + extends PhabricatorFerretEngine { 5 + 6 + public function getApplicationName() { 7 + return 'ponder'; 8 + } 9 + 10 + public function getScopeName() { 11 + return 'question'; 12 + } 13 + 14 + public function newSearchEngine() { 15 + return new PonderQuestionSearchEngine(); 16 + } 17 + 18 + }
+11 -1
src/applications/ponder/storage/PonderQuestion.php
··· 11 11 PhabricatorProjectInterface, 12 12 PhabricatorDestructibleInterface, 13 13 PhabricatorSpacesInterface, 14 - PhabricatorFulltextInterface { 14 + PhabricatorFulltextInterface, 15 + PhabricatorFerretInterface { 15 16 16 17 const MARKUP_FIELD_CONTENT = 'markup:content'; 17 18 ··· 299 300 public function newFulltextEngine() { 300 301 return new PonderQuestionFulltextEngine(); 301 302 } 303 + 304 + 305 + /* -( PhabricatorFerretInterface )----------------------------------------- */ 306 + 307 + 308 + public function newFerretEngine() { 309 + return new PonderQuestionFerretEngine(); 310 + } 311 + 302 312 303 313 }