@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.

Clean up virtual "_ft_rank" column for query construction of Ferret objects

Summary:
Ref T12974. Ferret object queries SELECT a virtual "_ft_rank" column for relevance ordering.

Currently, they always SELECT this column. That's fine and doesn't hurt anything, but makes developing and debugging things kind of a pain since every query has this `, blah blah _ft_rank` junk.

Instead, construct this column only if we're actually going to use it.

Mostly, this cleans up DarkConsole / query logs a bit.

Test Plan:
Viewed normal query results on various pages, viewed global search results, ordered Maniphest tasks by normal stuff and by "Relevance".

Viewed DarkConsole, saw no more "_ft_rank" junk on normal pages.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12974

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

+7
+7
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
··· 1565 1565 return $select; 1566 1566 } 1567 1567 1568 + $vector = $this->getOrderVector(); 1569 + if (!$vector->containsKey('rank')) { 1570 + // We only need to SELECT the virtual "_ft_rank" column if we're 1571 + // actually sorting the results by rank. 1572 + return $select; 1573 + } 1574 + 1568 1575 if (!$this->ferretEngine) { 1569 1576 $select[] = '0 _ft_rank'; 1570 1577 return $select;