@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Reduce Maniphest fulltext limit from PHP_INT_MAX to 10k

Summary:
PHP_INT_MAX is rejected by ElasticSearch since it's outside of the representable integer range (see: <https://gist.github.com/JustinTulloss/c4ac0e1c93d6d1e91744>).

Just use 10K, as matching more than 10K results probably isn't useful to anyone.

Test Plan: Confirmed this fixes the issue in IRC. Ran a fulltext search.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7097

+4 -1
+4 -1
src/applications/maniphest/query/ManiphestTaskQuery.php
··· 482 482 // fulltext search, and then use that to limit the rest of the search 483 483 $fulltext_query = new PhabricatorSearchQuery(); 484 484 $fulltext_query->setQuery($this->fullTextSearch); 485 - $fulltext_query->setParameter('limit', PHP_INT_MAX); 485 + 486 + // NOTE: Setting this to something larger than 2^53 will raise errors in 487 + // ElasticSearch, and billions of results won't fit in memory anyway. 488 + $fulltext_query->setParameter('limit', 100000); 486 489 $fulltext_query->setParameter('type', ManiphestPHIDTypeTask::TYPECONST); 487 490 488 491 $engine = PhabricatorSearchEngineSelector::newSelector()->newEngine();