X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FProfile.php;h=b8178e9b660ebbab3678d01469ba7eb27e8f4d62;hb=48625da04b8ab5865c31aef38033b94bf8cfa983;hp=8cea91ece6e28ef88b82aa529d2ad01e7c19bf69;hpb=5b0192a8acf74874e76ddbf4663b99fd9da66307;p=quix0rs-gnu-social.git diff --git a/classes/Profile.php b/classes/Profile.php index 8cea91ece6..b8178e9b66 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -51,7 +51,7 @@ class Profile extends Managed_DataObject public static function schemaDef() { - return array( + $def = array( 'description' => 'local and remote users have profiles', 'fields' => array( 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'), @@ -74,6 +74,14 @@ class Profile extends Managed_DataObject 'profile_nickname_idx' => array('nickname'), ) ); + + // Add a fulltext index + + if (common_config('search', 'type') == 'fulltext') { + $def['fulltext indexes'] = array('nickname' => array('nickname', 'fullname', 'location', 'bio', 'homepage')); + } + + return $def; } function multiGet($keyCol, $keyVals, $skipNulls=true)