mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Extend "fulltext" and "ngrams" interfaces from "indexable" interface
Summary: Ref T8788. See D17702. This allows `bin/search index` to index stuff which only implements `Ngrams`, not `Fulltext`. Test Plan: Kinda poked around `bin/search index` a bit, yell if you hit more issues deeper down the stack? Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T8788 Differential Revision: https://secure.phabricator.com/D17704
This commit is contained in:
parent
2d00f56837
commit
6052bc1933
5 changed files with 11 additions and 3 deletions
|
@ -2924,6 +2924,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorIndexEngine' => 'applications/search/index/PhabricatorIndexEngine.php',
|
||||
'PhabricatorIndexEngineExtension' => 'applications/search/index/PhabricatorIndexEngineExtension.php',
|
||||
'PhabricatorIndexEngineExtensionModule' => 'applications/search/index/PhabricatorIndexEngineExtensionModule.php',
|
||||
'PhabricatorIndexableInterface' => 'applications/search/interface/PhabricatorIndexableInterface.php',
|
||||
'PhabricatorInfrastructureTestCase' => '__tests__/PhabricatorInfrastructureTestCase.php',
|
||||
'PhabricatorInlineCommentController' => 'infrastructure/diff/PhabricatorInlineCommentController.php',
|
||||
'PhabricatorInlineCommentInterface' => 'infrastructure/diff/interface/PhabricatorInlineCommentInterface.php',
|
||||
|
@ -8025,6 +8026,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorFulltextEngineExtension' => 'Phobject',
|
||||
'PhabricatorFulltextEngineExtensionModule' => 'PhabricatorConfigModule',
|
||||
'PhabricatorFulltextIndexEngineExtension' => 'PhabricatorIndexEngineExtension',
|
||||
'PhabricatorFulltextInterface' => 'PhabricatorIndexableInterface',
|
||||
'PhabricatorFulltextResultSet' => 'Phobject',
|
||||
'PhabricatorFulltextStorageEngine' => 'Phobject',
|
||||
'PhabricatorFulltextToken' => 'Phobject',
|
||||
|
@ -8299,6 +8301,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorNavigationRemarkupRule' => 'PhutilRemarkupRule',
|
||||
'PhabricatorNeverTriggerClock' => 'PhabricatorTriggerClock',
|
||||
'PhabricatorNgramsIndexEngineExtension' => 'PhabricatorIndexEngineExtension',
|
||||
'PhabricatorNgramsInterface' => 'PhabricatorIndexableInterface',
|
||||
'PhabricatorNotificationBuilder' => 'Phobject',
|
||||
'PhabricatorNotificationClearController' => 'PhabricatorNotificationController',
|
||||
'PhabricatorNotificationClient' => 'Phobject',
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
interface PhabricatorFulltextInterface {
|
||||
interface PhabricatorFulltextInterface
|
||||
extends PhabricatorIndexableInterface {
|
||||
|
||||
public function newFulltextEngine();
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
interface PhabricatorIndexableInterface {}
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
interface PhabricatorNgramsInterface {
|
||||
interface PhabricatorNgramsInterface
|
||||
extends PhabricatorIndexableInterface {
|
||||
|
||||
public function newNgrams();
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ final class PhabricatorSearchManagementIndexWorkflow
|
|||
|
||||
private function loadPHIDsByTypes($type) {
|
||||
$objects = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorFulltextInterface')
|
||||
->setAncestorClass('PhabricatorIndexableInterface')
|
||||
->execute();
|
||||
|
||||
$normalized_type = phutil_utf8_strtolower($type);
|
||||
|
|
Loading…
Reference in a new issue