mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Add "fulltext" to Maniphest pro search
Summary: Restores this field to the new ApplicationSearch-based search. Test Plan: Used fulltext search to find tasks. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D6950
This commit is contained in:
parent
a3c6e9aebf
commit
f679ea7d7e
2 changed files with 14 additions and 1 deletions
|
@ -425,7 +425,7 @@ final class ManiphestTaskQuery
|
|||
}
|
||||
|
||||
private function buildFullTextWhereClause(AphrontDatabaseConnection $conn) {
|
||||
if (!$this->fullTextSearch) {
|
||||
if (!strlen($this->fullTextSearch)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -434,6 +434,7 @@ final class ManiphestTaskQuery
|
|||
$fulltext_query = new PhabricatorSearchQuery();
|
||||
$fulltext_query->setQuery($this->fullTextSearch);
|
||||
$fulltext_query->setParameter('limit', PHP_INT_MAX);
|
||||
$fulltext_query->setParameter('type', ManiphestPHIDTypeTask::TYPECONST);
|
||||
|
||||
$engine = PhabricatorSearchEngineSelector::newSelector()->newEngine();
|
||||
$fulltext_results = $engine->executeSearch($fulltext_query);
|
||||
|
|
|
@ -31,6 +31,8 @@ final class ManiphestTaskSearchEngine
|
|||
}
|
||||
$saved->setParameter('ids', $ids);
|
||||
|
||||
$saved->setParameter('fulltext', $request->getStr('fulltext'));
|
||||
|
||||
return $saved;
|
||||
}
|
||||
|
||||
|
@ -75,6 +77,11 @@ final class ManiphestTaskSearchEngine
|
|||
$query->withIDs($ids);
|
||||
}
|
||||
|
||||
$fulltext = $saved->getParameter('fulltext');
|
||||
if (strlen($fulltext)) {
|
||||
$query->withFullTextSearch($fulltext);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
@ -158,6 +165,11 @@ final class ManiphestTaskSearchEngine
|
|||
->setLabel(pht('Order'))
|
||||
->setValue($saved->getParameter('order'))
|
||||
->setOptions($this->getOrderOptions()))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setName('fulltext')
|
||||
->setLabel(pht('Contains Text'))
|
||||
->setValue($saved->getParameter('fulltext')))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setName('ids')
|
||||
|
|
Loading…
Reference in a new issue