diff --git a/app/config/collections.php b/app/config/collections.php index abcdec9c1d..daccd9258d 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -99,8 +99,8 @@ $collections = [ '$id' => '_fulltext_search', 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [1024], - 'orders' => [Database::ORDER_ASC], + 'lengths' => [], + 'orders' => [], ], ], ], @@ -574,8 +574,8 @@ $collections = [ '$id' => '_key_search', 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [2048], - 'orders' => [Database::ORDER_ASC], + 'lengths' => [], + 'orders' => [], ], ], ], @@ -1106,8 +1106,8 @@ $collections = [ '$id' => '_key_search', 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [2048], - 'orders' => [Database::ORDER_ASC], + 'lengths' => [], + 'orders' => [], ], [ '$id' => '_key_deleted_email', @@ -1422,8 +1422,8 @@ $collections = [ '$id' => '_key_search', 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [2048], - 'orders' => [Database::ORDER_ASC], + 'lengths' => [], + 'orders' => [], ], ], ], @@ -1720,8 +1720,8 @@ $collections = [ '$id' => '_key_search', 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [2048], - 'orders' => [Database::ORDER_ASC], + 'lengths' => [], + 'orders' => [], ], ], ], @@ -1892,8 +1892,8 @@ $collections = [ '$id' => '_key_search', 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [2048], - 'orders' => [Database::ORDER_ASC], + 'lengths' => [], + 'orders' => [], ], ], ], @@ -1983,8 +1983,8 @@ $collections = [ '$id' => '_key_search', 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [2048], - 'orders' => [Database::ORDER_ASC], + 'lengths' => [], + 'orders' => [], ], ], ], @@ -2118,8 +2118,8 @@ $collections = [ '$id' => '_fulltext_search', 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [16384], - 'orders' => [Database::ORDER_ASC], + 'lengths' => [], + 'orders' => [], ], ], ], diff --git a/app/init.php b/app/init.php index d591d1ddbd..a45ac69aea 100644 --- a/app/init.php +++ b/app/init.php @@ -491,11 +491,12 @@ $register->set('geodb', function () { }); $register->set('db', function () { // This is usually for our workers or CLI commands scope $dbHost = App::getEnv('_APP_DB_HOST', ''); + $dbPort = App::getEnv('_APP_DB_PORT', ''); $dbUser = App::getEnv('_APP_DB_USER', ''); $dbPass = App::getEnv('_APP_DB_PASS', ''); $dbScheme = App::getEnv('_APP_DB_SCHEMA', ''); - $pdo = new PDO("mysql:host={$dbHost};dbname={$dbScheme};charset=utf8mb4", $dbUser, $dbPass, array( + $pdo = new PDO("mysql:host={$dbHost};port={$dbPort};dbname={$dbScheme};charset=utf8mb4", $dbUser, $dbPass, array( PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4', PDO::ATTR_TIMEOUT => 3, // Seconds PDO::ATTR_PERSISTENT => true,