diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 0612b50566..7ea750f2b3 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -1820,17 +1820,6 @@ return [ 'array' => false, 'filters' => ['json'], ], - [ - '$id' => ID::custom('search'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 16384, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], [ '$id' => ID::custom('scheduledAt'), 'type' => Database::VAR_DATETIME, @@ -1873,13 +1862,6 @@ return [ 'lengths' => [Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC], ], - [ - '$id' => ID::custom('_fulltext_search'), - 'type' => Database::INDEX_FULLTEXT, - 'attributes' => ['search'], - 'lengths' => [], - 'orders' => [], - ], [ '$id' => ID::custom('_key_trigger'), 'type' => Database::INDEX_KEY, diff --git a/app/controllers/general.php b/app/controllers/general.php index 6cd4405321..f28409567e 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -330,7 +330,6 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw 'errors' => '', 'logs' => '', 'duration' => 0.0, - 'search' => implode(' ', [$resource->getId(), $executionId]), ]); if ($type === 'function') { diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php index 0bb755a1f2..422b5f767f 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php @@ -249,7 +249,6 @@ class Create extends Base 'errors' => '', 'logs' => '', 'duration' => 0.0, - 'search' => implode(' ', [$functionId, $executionId]), ]); $queueForEvents diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Executions/XList.php b/src/Appwrite/Platform/Modules/Functions/Http/Executions/XList.php index 597e830dd3..7f133ee548 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Executions/XList.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Executions/XList.php @@ -19,7 +19,6 @@ use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -use Utopia\Validator\Text; class XList extends Base { @@ -55,13 +54,12 @@ class XList extends Base )) ->param('functionId', '', new UID(), 'Function ID.') ->param('queries', [], new Executions(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Executions::ALLOWED_ATTRIBUTES), true) - ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') ->callback([$this, 'action']); } - public function action(string $functionId, array $queries, string $search, Response $response, Database $dbForProject) + public function action(string $functionId, array $queries, Response $response, Database $dbForProject) { $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); @@ -78,10 +76,6 @@ class XList extends Base throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } - if (!empty($search)) { - $queries[] = Query::search('search', $search); - } - // Set internal queries $queries[] = Query::equal('resourceInternalId', [$function->getInternalId()]); $queries[] = Query::equal('resourceType', ['functions']); diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Logs/XList.php b/src/Appwrite/Platform/Modules/Sites/Http/Logs/XList.php index 134978d8b9..8a9630b28b 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Logs/XList.php @@ -18,7 +18,6 @@ use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -use Utopia\Validator\Text; class XList extends Base { @@ -54,13 +53,12 @@ class XList extends Base )) ->param('siteId', '', new UID(), 'Site ID.') ->param('queries', [], new Logs(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Executions::ALLOWED_ATTRIBUTES), true) - ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') ->callback([$this, 'action']); } - public function action(string $siteId, array $queries, string $search, Response $response, Database $dbForProject) + public function action(string $siteId, array $queries, Response $response, Database $dbForProject) { $site = $dbForProject->getDocument('sites', $siteId); @@ -74,10 +72,6 @@ class XList extends Base throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } - if (!empty($search)) { - $queries[] = Query::search('search', $search); - } - // Set internal queries $queries[] = Query::equal('resourceInternalId', [$site->getInternalId()]); $queries[] = Query::equal('resourceType', ['sites']); diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Sites/Update.php b/src/Appwrite/Platform/Modules/Sites/Http/Sites/Update.php index 35e4fb07e3..6641f000f1 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Sites/Update.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Sites/Update.php @@ -98,8 +98,33 @@ class Update extends Base ->callback([$this, 'action']); } - public function action(string $siteId, string $name, string $framework, bool $enabled, int $timeout, string $installCommand, string $buildCommand, string $outputDirectory, string $buildRuntime, string $adapter, string $fallbackFile, string $installationId, ?string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $specification, Request $request, Response $response, Database $dbForProject, Document $project, Event $queueForEvents, Build $queueForBuilds, Database $dbForPlatform, GitHub $github) - { + public function action( + string $siteId, + string $name, + string $framework, + bool $enabled, + int $timeout, + string $installCommand, + string $buildCommand, + string $outputDirectory, + string $buildRuntime, + string $adapter, + string $fallbackFile, + string $installationId, + ?string $providerRepositoryId, + string $providerBranch, + bool $providerSilentMode, + string $providerRootDirectory, + string $specification, + Request $request, + Response $response, + Database $dbForProject, + Document $project, + Event $queueForEvents, + Build $queueForBuilds, + Database $dbForPlatform, + GitHub $github + ) { if (!empty($adapter)) { $configFramework = Config::getParam('frameworks')[$framework] ?? []; $adapters = \array_keys($configFramework['adapters'] ?? []); diff --git a/src/Appwrite/Platform/Workers/Functions.php b/src/Appwrite/Platform/Workers/Functions.php index febaec54d7..1c952bc7a8 100644 --- a/src/Appwrite/Platform/Workers/Functions.php +++ b/src/Appwrite/Platform/Workers/Functions.php @@ -271,7 +271,6 @@ class Functions extends Action 'errors' => $message, 'logs' => '', 'duration' => 0.0, - 'search' => implode(' ', [$function->getId(), $executionId]), ]); $execution = $dbForProject->createDocument('executions', $execution); @@ -407,7 +406,6 @@ class Functions extends Action 'errors' => '', 'logs' => '', 'duration' => 0.0, - 'search' => implode(' ', [$functionId, $executionId]), ]); $execution = $dbForProject->createDocument('executions', $execution); diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Logs.php b/src/Appwrite/Utopia/Database/Validator/Queries/Logs.php index 329ce931d6..d07d3dd3d2 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Logs.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Logs.php @@ -5,6 +5,7 @@ namespace Appwrite\Utopia\Database\Validator\Queries; class Logs extends Base { public const ALLOWED_ATTRIBUTES = [ + 'status', 'responseStatusCode', 'duration', 'requestMethod',