Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/ferret/PhabricatorFerretEngine.php
| Show First 20 Lines • Show All 289 Lines • ▼ Show 20 Lines | return array( | ||||
| 'columns' => array('ngram', 'documentID'), | 'columns' => array('ngram', 'documentID'), | ||||
| ), | ), | ||||
| 'key_object' => array( | 'key_object' => array( | ||||
| 'columns' => array('documentID'), | 'columns' => array('documentID'), | ||||
| ), | ), | ||||
| ); | ); | ||||
| } | } | ||||
| public function getCommonNgramsTableName() { | |||||
| $application = $this->getApplicationName(); | |||||
| $scope = $this->getScopeName(); | |||||
| return "{$application}_{$scope}_fngrams_common"; | |||||
| } | |||||
| public function getCommonNgramsSchemaColumns() { | |||||
| return array( | |||||
| 'id' => 'auto', | |||||
| 'ngram' => 'char3', | |||||
| 'needsCollection' => 'bool', | |||||
| ); | |||||
| } | |||||
| public function getCommonNgramsSchemaKeys() { | |||||
| return array( | |||||
| 'PRIMARY' => array( | |||||
| 'columns' => array('id'), | |||||
| 'unique' => true, | |||||
| ), | |||||
| 'key_ngram' => array( | |||||
| 'columns' => array('ngram'), | |||||
| 'unique' => true, | |||||
| ), | |||||
| 'key_collect' => array( | |||||
| 'columns' => array('needsCollection'), | |||||
| ), | |||||
| ); | |||||
| } | |||||
| } | } | ||||