Add query limit of PHP_INT_MAX and handle the case where there are no fulltext results.
This commit is contained in:
@@ -353,10 +353,15 @@ final class ManiphestTaskQuery {
|
|||||||
// fulltext search, and then use that to limit the rest of the search
|
// fulltext search, and then use that to limit the rest of the search
|
||||||
$fulltext_query = new PhabricatorSearchQuery();
|
$fulltext_query = new PhabricatorSearchQuery();
|
||||||
$fulltext_query->setQuery($this->fullTextSearch);
|
$fulltext_query->setQuery($this->fullTextSearch);
|
||||||
|
$fulltext_query->setParameter('limit', PHP_INT_MAX);
|
||||||
|
|
||||||
$engine = PhabricatorSearchEngineSelector::newSelector()->newEngine();
|
$engine = PhabricatorSearchEngineSelector::newSelector()->newEngine();
|
||||||
$fulltext_results = $engine->executeSearch($fulltext_query);
|
$fulltext_results = $engine->executeSearch($fulltext_query);
|
||||||
|
|
||||||
|
if (empty($fulltext_results)) {
|
||||||
|
$fulltext_results = array(null);
|
||||||
|
}
|
||||||
|
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'phid IN (%Ls)',
|
'phid IN (%Ls)',
|
||||||
|
|||||||
Reference in New Issue
Block a user