Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15441565
D16960.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
D16960.diff
View Options
diff --git a/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php b/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
--- a/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
+++ b/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
@@ -347,13 +347,24 @@
$where = '';
}
+ if (strlen($compiled_query)) {
+ $order = '';
+ } else {
+ // When not executing a query, order by document creation date. This
+ // is the default view in object browser dialogs, like "Close Duplicate".
+ $order = qsprintf(
+ $conn,
+ 'ORDER BY document.documentCreated DESC');
+ }
+
return qsprintf(
$conn,
- 'SELECT %Q FROM %T document %Q %Q LIMIT 1000',
+ 'SELECT %Q FROM %T document %Q %Q %Q LIMIT 1000',
$select,
$document_table,
$join,
- $where);
+ $where,
+ $order);
}
protected function joinRelationship(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 27, 6:49 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705100
Default Alt Text
D16960.diff (1 KB)
Attached To
Mode
D16960: When running a fulltext query with no query, enforce order by document creation date
Attached
Detach File
Event Timeline
Log In to Comment