[DATABASE] Enable fulltext search by default
Also rename fulltext indices to more fitting names Imported from v2/f84dbb369f01a1d4a9bc362d01cdd100cdc79313
This commit is contained in:
parent
4128a5403d
commit
eb12ac5ef1
|
@ -212,7 +212,7 @@ abstract class DefaultSettings
|
|||
'allow_tagging' => ['local' => true, 'remote' => true],
|
||||
'description_limit' => null,
|
||||
],
|
||||
'search' => ['type' => 'like'],
|
||||
'search' => ['type' => 'fulltext'],
|
||||
'html_filter' => ['tags' => ['img', 'video', 'audio', 'script']],
|
||||
'notice' => [
|
||||
'content_limit' => null,
|
||||
|
|
|
@ -267,12 +267,9 @@ class Activity
|
|||
'activity_profile_id_verb_idx' => ['profile_id', 'verb'],
|
||||
'activity_replyto_idx' => ['reply_to'],
|
||||
],
|
||||
'fulltext indexes' => ['notice_fulltext_idx' => ['content']]
|
||||
];
|
||||
|
||||
if (isset($_ENV['SOCIAL_DB_USE_FULLTEXT_SEARCH'])) {
|
||||
$def['fulltext indexes'] = ['content' => ['content']];
|
||||
}
|
||||
|
||||
return $def;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -261,12 +261,11 @@ class Profile extends Entity
|
|||
'indexes' => [
|
||||
'profile_nickname_idx' => ['nickname'],
|
||||
],
|
||||
'fulltext indexes' => [
|
||||
'profile_fulltext_idx' => ['nickname', 'fullname', 'location', 'bio', 'homepage']
|
||||
],
|
||||
];
|
||||
|
||||
if (isset($_ENV['SOCIAL_DB_USE_FULLTEXT_SEARCH'])) {
|
||||
$def['fulltext indexes'] = ['nickname' => ['nickname', 'fullname', 'location', 'bio', 'homepage']];
|
||||
}
|
||||
|
||||
return $def;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user