Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14742016
D16945.id40779.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
922 B
Referenced Files
None
Subscribers
None
D16945.id40779.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
@@ -197,12 +197,18 @@
$join = array();
$where = array();
+ $title_field = PhabricatorSearchDocumentFieldType::FIELD_TITLE;
+ $title_boost = 1024;
+
$raw_query = $query->getParameter('query');
$compiled_query = $this->compileQuery($raw_query);
if (strlen($compiled_query)) {
$select[] = qsprintf(
$conn,
+ 'IF(field.field = %s, %d, 0) + '.
'MATCH(corpus) AGAINST (%s IN BOOLEAN MODE) AS fieldScore',
+ $title_field,
+ $title_boost,
$compiled_query);
$join[] = qsprintf(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 21, 4:01 AM (14 h, 50 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7025186
Default Alt Text
D16945.id40779.diff (922 B)
Attached To
Mode
D16945: Boost search result title matches
Attached
Detach File
Event Timeline
Log In to Comment