Differential D17670 Diff 42502 src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
| Show First 20 Lines • Show All 392 Lines • ▼ Show 20 Lines | protected function joinRelationship( | ||||
| return $sql; | return $sql; | ||||
| } | } | ||||
| private function compileQuery($raw_query) { | private function compileQuery($raw_query) { | ||||
| $stemmer = new PhutilSearchStemmer(); | $stemmer = new PhutilSearchStemmer(); | ||||
| $compiler = PhabricatorSearchDocument::newQueryCompiler() | $compiler = PhabricatorSearchDocument::newQueryCompiler() | ||||
| ->setQuery($raw_query) | |||||
| ->setStemmer($stemmer); | ->setStemmer($stemmer); | ||||
| $tokens = $compiler->newTokens($raw_query); | |||||
| $queries = array(); | $queries = array(); | ||||
| $queries[] = $compiler->compileLiteralQuery(); | $queries[] = $compiler->compileLiteralQuery($tokens); | ||||
| $queries[] = $compiler->compileStemmedQuery(); | $queries[] = $compiler->compileStemmedQuery($tokens); | ||||
| return implode(' ', array_filter($queries)); | return implode(' ', array_filter($queries)); | ||||
| } | } | ||||
| public function indexExists() { | public function indexExists() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| public function getIndexStats() { | public function getIndexStats() { | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||