Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14097220
D20354.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20354.id.diff
View Options
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
@@ -212,7 +212,7 @@
}
if ($this->supportsFerretEngine()) {
- if ($this->getFerretTokens()) {
+ if ($this->hasFerretOrder()) {
$map += array(
'rank' =>
$cursor->getRawRowProperty(self::FULLTEXT_RANK),
@@ -1840,15 +1840,16 @@
return $select;
}
- $vector = $this->getOrderVector();
- if (!$vector->containsKey('rank')) {
- // We only need to SELECT the virtual "_ft_rank" column if we're
+ if (!$this->hasFerretOrder()) {
+ // We only need to SELECT the virtual rank/relevance columns if we're
// actually sorting the results by rank.
return $select;
}
if (!$this->ferretEngine) {
$select[] = qsprintf($conn, '0 AS %T', self::FULLTEXT_RANK);
+ $select[] = qsprintf($conn, '0 AS %T', self::FULLTEXT_CREATED);
+ $select[] = qsprintf($conn, '0 AS %T', self::FULLTEXT_MODIFIED);
return $select;
}
@@ -3152,4 +3153,22 @@
}
}
+ private function hasFerretOrder() {
+ $vector = $this->getOrderVector();
+
+ if ($vector->containsKey('rank')) {
+ return true;
+ }
+
+ if ($vector->containsKey('fulltext-created')) {
+ return true;
+ }
+
+ if ($vector->containsKey('fulltext-modified')) {
+ return true;
+ }
+
+ return false;
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 6:31 AM (20 h, 37 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6789784
Default Alt Text
D20354.id.diff (1 KB)
Attached To
Mode
D20354: Correct some straggling Ferret/Cursor interactions
Attached
Detach File
Event Timeline
Log In to Comment