Page MenuHomePhabricator

D20296.id48440.diff
No OneTemporary

D20296.id48440.diff

diff --git a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
--- a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
+++ b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
@@ -1099,16 +1099,19 @@
'table' => null,
'column' => '_ft_rank',
'type' => 'int',
+ 'requires-ferret' => true,
);
$columns['fulltext-created'] = array(
'table' => 'ft_doc',
'column' => 'epochCreated',
'type' => 'int',
+ 'requires-ferret' => true,
);
$columns['fulltext-modified'] = array(
'table' => 'ft_doc',
'column' => 'epochModified',
'type' => 'int',
+ 'requires-ferret' => true,
);
}
@@ -1131,6 +1134,16 @@
$parts = array();
foreach ($vector as $order) {
$part = $orderable[$order->getOrderKey()];
+
+ // If this is a Ferret fulltext column but the query doesn't actually
+ // have a fulltext query, we'll skip most of the Ferret stuff and won't
+ // actually have the columns in the result set. Just skip them.
+ if (!empty($part['requires-ferret'])) {
+ if (!$this->getFerretTokens()) {
+ continue;
+ }
+ }
+
if ($order->getIsReversed()) {
$part['reverse'] = !idx($part, 'reverse', false);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 13, 7:11 PM (3 d, 11 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7741776
Default Alt Text
D20296.id48440.diff (1 KB)

Event Timeline