mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-24 15:52:41 +01:00
8059db894d
Summary: Ref T12819. I started trying to get individual engines to drive these constraints (e.g., `ManiphestTaskQuery` can do most of the work) but this is a big pain, especially since most engines don't support "any owner" or "no owner", and not everything has an owner, and so on and so on. Going down this path would have meant a huge pile of stub functions everywhere, I think. Instead, drive these through the main engine using the fulltext document table, which already has everything we need to apply these constraints in a uniform way. Also tweak some parts of query construction and result ordering. Test Plan: Searched for documents by author, owner, unowned, any owner, tags, subscribers, fulltext in global search. Got sensible results without any application-specific code. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12819 Differential Revision: https://secure.phabricator.com/D18550
31 lines
622 B
PHP
31 lines
622 B
PHP
<?php
|
|
|
|
final class ManiphestTaskFerretEngine
|
|
extends PhabricatorFerretEngine {
|
|
|
|
public function newNgramsObject() {
|
|
return new ManiphestTaskFerretNgrams();
|
|
}
|
|
|
|
public function newDocumentObject() {
|
|
return new ManiphestTaskFerretDocument();
|
|
}
|
|
|
|
public function newFieldObject() {
|
|
return new ManiphestTaskFerretField();
|
|
}
|
|
|
|
public function newSearchEngine() {
|
|
return new ManiphestTaskSearchEngine();
|
|
}
|
|
|
|
protected function getFunctionMap() {
|
|
$map = parent::getFunctionMap();
|
|
|
|
$map['body']['aliases'][] = 'desc';
|
|
$map['body']['aliases'][] = 'description';
|
|
|
|
return $map;
|
|
}
|
|
|
|
}
|