mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Fix query types on maniphest fulltext search.
Summary: Parameter `type` is not used anywhere. Instead param `types` is used. Due this bug search was performed over whole index instead on tasks only. Test Plan: - Setup phabricator to run with Elasticsearch. - Open http://yourphab.com/conduit/method/maniphest.query/ - Fill `fullText` field only. - Expect get results. Query should be performed on `/phabricator/TASK/` only (not on whole `/phabricator/` index). Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12542
This commit is contained in:
parent
6f1b39c0b8
commit
7196d29c0c
1 changed files with 2 additions and 1 deletions
|
@ -560,7 +560,8 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
// NOTE: Setting this to something larger than 2^53 will raise errors in
|
// NOTE: Setting this to something larger than 2^53 will raise errors in
|
||||||
// ElasticSearch, and billions of results won't fit in memory anyway.
|
// ElasticSearch, and billions of results won't fit in memory anyway.
|
||||||
$fulltext_query->setParameter('limit', 100000);
|
$fulltext_query->setParameter('limit', 100000);
|
||||||
$fulltext_query->setParameter('type', ManiphestTaskPHIDType::TYPECONST);
|
$fulltext_query->setParameter('types',
|
||||||
|
array(ManiphestTaskPHIDType::TYPECONST));
|
||||||
|
|
||||||
$engine = PhabricatorSearchEngineSelector::newSelector()->newEngine();
|
$engine = PhabricatorSearchEngineSelector::newSelector()->newEngine();
|
||||||
$fulltext_results = $engine->executeSearch($fulltext_query);
|
$fulltext_results = $engine->executeSearch($fulltext_query);
|
||||||
|
|
Loading…
Reference in a new issue