mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-02 19:52:44 +01:00
6e57582aff
Summary: Ref T11404. Currently, SearchEngineAttachments can bulk-load data but SearchEngineExtensions can not. This leads to poor performance of custom fields. See T11404 for discussion. This changes the API to support a bulk load + format pattern like the one Attachments use. The next change will use it to bulk-load custom field data. Test Plan: - Ran `differential.query`, `differential.revision.search` as a sanity check. - No behavioral changes are expected - See next revision. Reviewers: yelirekim, chad Reviewed By: chad Maniphest Tasks: T11404 Differential Revision: https://secure.phabricator.com/D16350
36 lines
819 B
PHP
36 lines
819 B
PHP
<?php
|
|
|
|
final class ConduitResultSearchEngineExtension
|
|
extends PhabricatorSearchEngineExtension {
|
|
|
|
const EXTENSIONKEY = 'conduit';
|
|
|
|
public function isExtensionEnabled() {
|
|
return true;
|
|
}
|
|
|
|
public function getExtensionOrder() {
|
|
return 1500;
|
|
}
|
|
|
|
public function getExtensionName() {
|
|
return pht('Support for ConduitResultInterface');
|
|
}
|
|
|
|
public function supportsObject($object) {
|
|
return ($object instanceof PhabricatorConduitResultInterface);
|
|
}
|
|
|
|
public function getFieldSpecificationsForConduit($object) {
|
|
return $object->getFieldSpecificationsForConduit();
|
|
}
|
|
|
|
public function getFieldValuesForConduit($object, $data) {
|
|
return $object->getFieldValuesForConduit();
|
|
}
|
|
|
|
public function getSearchAttachments($object) {
|
|
return $object->getConduitSearchAttachments();
|
|
}
|
|
|
|
}
|