Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/query/ManiphestTaskQuery.php
Show First 20 Lines • Show All 493 Lines • ▼ Show 20 Lines | $fulltext_query = id(new PhabricatorSavedQuery()) | ||||
->setParameter('query', $this->fullTextSearch); | ->setParameter('query', $this->fullTextSearch); | ||||
// 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('types', | $fulltext_query->setParameter('types', | ||||
array(ManiphestTaskPHIDType::TYPECONST)); | array(ManiphestTaskPHIDType::TYPECONST)); | ||||
$engine = PhabricatorSearchEngine::loadEngine(); | $engine = PhabricatorFulltextStorageEngine::loadEngine(); | ||||
$fulltext_results = $engine->executeSearch($fulltext_query); | $fulltext_results = $engine->executeSearch($fulltext_query); | ||||
if (empty($fulltext_results)) { | if (empty($fulltext_results)) { | ||||
$fulltext_results = array(null); | $fulltext_results = array(null); | ||||
} | } | ||||
return qsprintf( | return qsprintf( | ||||
$conn, | $conn, | ||||
▲ Show 20 Lines • Show All 328 Lines • Show Last 20 Lines |