diff --git a/src/Core/DB/DefaultSettings.php b/src/Core/DB/DefaultSettings.php index 5bac1a6856..53a7b8da7f 100644 --- a/src/Core/DB/DefaultSettings.php +++ b/src/Core/DB/DefaultSettings.php @@ -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, diff --git a/src/Entity/Activity.php b/src/Entity/Activity.php index 0c8e9e94c2..a6de78619a 100644 --- a/src/Entity/Activity.php +++ b/src/Entity/Activity.php @@ -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; } } diff --git a/src/Entity/Profile.php b/src/Entity/Profile.php index c879923745..fa9e7a272d 100644 --- a/src/Entity/Profile.php +++ b/src/Entity/Profile.php @@ -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; } }