diff --git a/src/Appwrite/Platform/Modules/Console/Http/Variables/Get.php b/src/Appwrite/Platform/Modules/Console/Http/Variables/Get.php index 6147ae61dc..c2c011af00 100644 --- a/src/Appwrite/Platform/Modules/Console/Http/Variables/Get.php +++ b/src/Appwrite/Platform/Modules/Console/Http/Variables/Get.php @@ -95,6 +95,7 @@ class Get extends Action 'supportForRelationships' => $adapter->getSupportForRelationships(), 'supportForOperators' => $adapter->getSupportForOperators(), 'supportForSpatials' => $adapter->getSupportForSpatialAttributes(), + 'supportForFulltextWildcard' => $adapter->getSupportForFulltextWildcardIndex(), 'maxIndexLength' => $adapter->getMaxIndexLength(), ]); diff --git a/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php b/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php index fc6b7b6af1..d67fd96993 100644 --- a/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php +++ b/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php @@ -142,6 +142,15 @@ class ConsoleVariables extends Model 'example' => true, ] ) + ->addRule( + 'supportForFulltextWildcard', + [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Whether the database adapter supports fulltext wildcard search.', + 'default' => true, + 'example' => true, + ] + ) ->addRule( 'maxIndexLength', [ diff --git a/tests/e2e/Scopes/Scope.php b/tests/e2e/Scopes/Scope.php index 11b119b43e..2307e3f76f 100644 --- a/tests/e2e/Scopes/Scope.php +++ b/tests/e2e/Scopes/Scope.php @@ -95,6 +95,14 @@ abstract class Scope extends TestCase return $this->getConsoleVariables()['supportForSpatials'] ?? true; } + /** + * Check if the database adapter supports fulltext wildcard search + */ + protected function getSupportForFulltextWildcard(): bool + { + return $this->getConsoleVariables()['supportForFulltextWildcard'] ?? true; + } + /** * Get the maximum index length supported by the database adapter */ diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 996c0fe41f..fde8ec13e9 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -707,7 +707,7 @@ trait UsersBase $this->assertCount(1, $response['body']['users']); // Some databases only support fulltext search on complete words - if ($this->getSupportForRelationships()) { + if ($this->getSupportForFulltextWildcard()) { $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'],