Page MenuHomePhabricator

D18566.id44596.diff
No OneTemporary

D18566.id44596.diff

diff --git a/resources/sql/autopatches/20170907.ferret.19.project.doc.sql b/resources/sql/autopatches/20170907.ferret.19.project.doc.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20170907.ferret.19.project.doc.sql
@@ -0,0 +1,9 @@
+CREATE TABLE {$NAMESPACE}_project.project_project_fdocument (
+ id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ objectPHID VARBINARY(64) NOT NULL,
+ isClosed BOOL NOT NULL,
+ authorPHID VARBINARY(64),
+ ownerPHID VARBINARY(64),
+ epochCreated INT UNSIGNED NOT NULL,
+ epochModified INT UNSIGNED NOT NULL
+) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
diff --git a/resources/sql/autopatches/20170907.ferret.20.project.field.sql b/resources/sql/autopatches/20170907.ferret.20.project.field.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20170907.ferret.20.project.field.sql
@@ -0,0 +1,8 @@
+CREATE TABLE {$NAMESPACE}_project.project_project_ffield (
+ id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ documentID INT UNSIGNED NOT NULL,
+ fieldKey VARCHAR(4) NOT NULL COLLATE {$COLLATE_TEXT},
+ rawCorpus LONGTEXT NOT NULL COLLATE {$COLLATE_SORT},
+ termCorpus LONGTEXT NOT NULL COLLATE {$COLLATE_SORT},
+ normalCorpus LONGTEXT NOT NULL COLLATE {$COLLATE_SORT}
+) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
diff --git a/resources/sql/autopatches/20170907.ferret.21.project.ngrams.sql b/resources/sql/autopatches/20170907.ferret.21.project.ngrams.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20170907.ferret.21.project.ngrams.sql
@@ -0,0 +1,5 @@
+CREATE TABLE {$NAMESPACE}_project.project_project_fngrams (
+ id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ documentID INT UNSIGNED NOT NULL,
+ ngram CHAR(3) NOT NULL COLLATE {$COLLATE_TEXT}
+) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
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
@@ -3666,6 +3666,7 @@
'PhabricatorProjectEditController' => 'applications/project/controller/PhabricatorProjectEditController.php',
'PhabricatorProjectEditEngine' => 'applications/project/engine/PhabricatorProjectEditEngine.php',
'PhabricatorProjectEditPictureController' => 'applications/project/controller/PhabricatorProjectEditPictureController.php',
+ 'PhabricatorProjectFerretEngine' => 'applications/project/search/PhabricatorProjectFerretEngine.php',
'PhabricatorProjectFilterTransaction' => 'applications/project/xaction/PhabricatorProjectFilterTransaction.php',
'PhabricatorProjectFulltextEngine' => 'applications/project/search/PhabricatorProjectFulltextEngine.php',
'PhabricatorProjectHeraldAction' => 'applications/project/herald/PhabricatorProjectHeraldAction.php',
@@ -9105,6 +9106,7 @@
'PhabricatorCustomFieldInterface',
'PhabricatorDestructibleInterface',
'PhabricatorFulltextInterface',
+ 'PhabricatorFerretInterface',
'PhabricatorConduitResultInterface',
'PhabricatorColumnProxyInterface',
),
@@ -9164,6 +9166,7 @@
'PhabricatorProjectEditController' => 'PhabricatorProjectController',
'PhabricatorProjectEditEngine' => 'PhabricatorEditEngine',
'PhabricatorProjectEditPictureController' => 'PhabricatorProjectController',
+ 'PhabricatorProjectFerretEngine' => 'PhabricatorFerretEngine',
'PhabricatorProjectFilterTransaction' => 'PhabricatorProjectTransactionType',
'PhabricatorProjectFulltextEngine' => 'PhabricatorFulltextEngine',
'PhabricatorProjectHeraldAction' => 'HeraldAction',
diff --git a/src/applications/project/search/PhabricatorProjectFerretEngine.php b/src/applications/project/search/PhabricatorProjectFerretEngine.php
new file mode 100644
--- /dev/null
+++ b/src/applications/project/search/PhabricatorProjectFerretEngine.php
@@ -0,0 +1,18 @@
+<?php
+
+final class PhabricatorProjectFerretEngine
+ extends PhabricatorFerretEngine {
+
+ public function getApplicationName() {
+ return 'project';
+ }
+
+ public function getScopeName() {
+ return 'project';
+ }
+
+ public function newSearchEngine() {
+ return new PhabricatorProjectSearchEngine();
+ }
+
+}
diff --git a/src/applications/project/storage/PhabricatorProject.php b/src/applications/project/storage/PhabricatorProject.php
--- a/src/applications/project/storage/PhabricatorProject.php
+++ b/src/applications/project/storage/PhabricatorProject.php
@@ -9,6 +9,7 @@
PhabricatorCustomFieldInterface,
PhabricatorDestructibleInterface,
PhabricatorFulltextInterface,
+ PhabricatorFerretInterface,
PhabricatorConduitResultInterface,
PhabricatorColumnProxyInterface {
@@ -729,6 +730,14 @@
}
+/* -( PhabricatorFerretInterface )--------------------------------------- */
+
+
+ public function newFerretEngine() {
+ return new PhabricatorProjectFerretEngine();
+ }
+
+
/* -( PhabricatorConduitResultInterface )---------------------------------- */

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 19, 6:26 AM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6730771
Default Alt Text
D18566.id44596.diff (4 KB)

Event Timeline