Support Ferret engine in Calendar
Summary: Ref T12819. Adds ferret engine support for Calendar events. Test Plan: Indexed and queried calendar events. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12819 Differential Revision: https://secure.phabricator.com/D18568
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
CREATE TABLE {$NAMESPACE}_calendar.calendar_event_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};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
CREATE TABLE {$NAMESPACE}_calendar.calendar_event_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};
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
CREATE TABLE {$NAMESPACE}_calendar.calendar_event_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};
|
||||||
@@ -2208,6 +2208,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorCalendarEventEmailCommand' => 'applications/calendar/command/PhabricatorCalendarEventEmailCommand.php',
|
'PhabricatorCalendarEventEmailCommand' => 'applications/calendar/command/PhabricatorCalendarEventEmailCommand.php',
|
||||||
'PhabricatorCalendarEventEndDateTransaction' => 'applications/calendar/xaction/PhabricatorCalendarEventEndDateTransaction.php',
|
'PhabricatorCalendarEventEndDateTransaction' => 'applications/calendar/xaction/PhabricatorCalendarEventEndDateTransaction.php',
|
||||||
'PhabricatorCalendarEventExportController' => 'applications/calendar/controller/PhabricatorCalendarEventExportController.php',
|
'PhabricatorCalendarEventExportController' => 'applications/calendar/controller/PhabricatorCalendarEventExportController.php',
|
||||||
|
'PhabricatorCalendarEventFerretEngine' => 'applications/calendar/search/PhabricatorCalendarEventFerretEngine.php',
|
||||||
'PhabricatorCalendarEventForkTransaction' => 'applications/calendar/xaction/PhabricatorCalendarEventForkTransaction.php',
|
'PhabricatorCalendarEventForkTransaction' => 'applications/calendar/xaction/PhabricatorCalendarEventForkTransaction.php',
|
||||||
'PhabricatorCalendarEventFrequencyTransaction' => 'applications/calendar/xaction/PhabricatorCalendarEventFrequencyTransaction.php',
|
'PhabricatorCalendarEventFrequencyTransaction' => 'applications/calendar/xaction/PhabricatorCalendarEventFrequencyTransaction.php',
|
||||||
'PhabricatorCalendarEventFulltextEngine' => 'applications/calendar/search/PhabricatorCalendarEventFulltextEngine.php',
|
'PhabricatorCalendarEventFulltextEngine' => 'applications/calendar/search/PhabricatorCalendarEventFulltextEngine.php',
|
||||||
@@ -7446,6 +7447,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorFlaggableInterface',
|
'PhabricatorFlaggableInterface',
|
||||||
'PhabricatorSpacesInterface',
|
'PhabricatorSpacesInterface',
|
||||||
'PhabricatorFulltextInterface',
|
'PhabricatorFulltextInterface',
|
||||||
|
'PhabricatorFerretInterface',
|
||||||
'PhabricatorConduitResultInterface',
|
'PhabricatorConduitResultInterface',
|
||||||
),
|
),
|
||||||
'PhabricatorCalendarEventAcceptTransaction' => 'PhabricatorCalendarEventReplyTransaction',
|
'PhabricatorCalendarEventAcceptTransaction' => 'PhabricatorCalendarEventReplyTransaction',
|
||||||
@@ -7466,6 +7468,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorCalendarEventEmailCommand' => 'MetaMTAEmailTransactionCommand',
|
'PhabricatorCalendarEventEmailCommand' => 'MetaMTAEmailTransactionCommand',
|
||||||
'PhabricatorCalendarEventEndDateTransaction' => 'PhabricatorCalendarEventDateTransaction',
|
'PhabricatorCalendarEventEndDateTransaction' => 'PhabricatorCalendarEventDateTransaction',
|
||||||
'PhabricatorCalendarEventExportController' => 'PhabricatorCalendarController',
|
'PhabricatorCalendarEventExportController' => 'PhabricatorCalendarController',
|
||||||
|
'PhabricatorCalendarEventFerretEngine' => 'PhabricatorFerretEngine',
|
||||||
'PhabricatorCalendarEventForkTransaction' => 'PhabricatorCalendarEventTransactionType',
|
'PhabricatorCalendarEventForkTransaction' => 'PhabricatorCalendarEventTransactionType',
|
||||||
'PhabricatorCalendarEventFrequencyTransaction' => 'PhabricatorCalendarEventTransactionType',
|
'PhabricatorCalendarEventFrequencyTransaction' => 'PhabricatorCalendarEventTransactionType',
|
||||||
'PhabricatorCalendarEventFulltextEngine' => 'PhabricatorFulltextEngine',
|
'PhabricatorCalendarEventFulltextEngine' => 'PhabricatorFulltextEngine',
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorCalendarEventFerretEngine
|
||||||
|
extends PhabricatorFerretEngine {
|
||||||
|
|
||||||
|
public function getApplicationName() {
|
||||||
|
return 'calendar';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getScopeName() {
|
||||||
|
return 'event';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function newSearchEngine() {
|
||||||
|
return new PhabricatorCalendarEventSearchEngine();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||||||
PhabricatorFlaggableInterface,
|
PhabricatorFlaggableInterface,
|
||||||
PhabricatorSpacesInterface,
|
PhabricatorSpacesInterface,
|
||||||
PhabricatorFulltextInterface,
|
PhabricatorFulltextInterface,
|
||||||
|
PhabricatorFerretInterface,
|
||||||
PhabricatorConduitResultInterface {
|
PhabricatorConduitResultInterface {
|
||||||
|
|
||||||
protected $name;
|
protected $name;
|
||||||
@@ -1380,6 +1381,14 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -( PhabricatorFerretInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
public function newFerretEngine() {
|
||||||
|
return new PhabricatorCalendarEventFerretEngine();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorConduitResultInterface )---------------------------------- */
|
/* -( PhabricatorConduitResultInterface )---------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user