{"id":"84ad0b10970faf47","repo":"laravel/framework","slug":"this-database-engine-does-not-support-fulltext-sea","errorCode":null,"errorMessage":"This database engine does not support fulltext search operations.","messagePattern":"This database engine does not support fulltext search operations\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/Illuminate/Database/Query/Grammars/Grammar.php","lineNumber":837,"sourceCode":"     * @return string\n     */\n    public function compileJsonValueCast($value)\n    {\n        return $value;\n    }\n\n    /**\n     * Compile a \"where fulltext\" clause.\n     *\n     * @param  \\Illuminate\\Database\\Query\\Builder  $query\n     * @param  array  $where\n     * @return string\n     *\n     * @throws \\RuntimeException\n     */\n    public function whereFullText(Builder $query, $where)\n    {\n        throw new RuntimeException('This database engine does not support fulltext search operations.');\n    }\n\n    /**\n     * Compile a clause based on an expression.\n     *\n     * @param  \\Illuminate\\Database\\Query\\Builder  $query\n     * @param  array  $where\n     * @return string\n     */\n    public function whereExpression(Builder $query, $where)\n    {\n        return $where['column']->getValue($this);\n    }\n\n    /**\n     * Compile the \"group by\" portions of the query.\n     *\n     * @param  \\Illuminate\\Database\\Query\\Builder  $query","sourceCodeStart":819,"sourceCodeEnd":855,"githubUrl":"https://github.com/laravel/framework/blob/bd6b5437e6ad87bb49f9b426724f07a9f64e9683/src/Illuminate/Database/Query/Grammars/Grammar.php#L819-L855","documentation":"The base Grammar::whereFullText() throws because this engine has no full-text search compilation. Only MySqlGrammar and PostgresGrammar override whereFullText; SQLite and SQL Server use the base method and throw, because their full-text capabilities (FTS5 / CONTAINS) differ structurally and Laravel does not map them through this builder method.","triggerScenarios":"Calling whereFullText($columns, $value) on a sqlite or sqlsrv connection.","commonSituations":"Building search with whereFullText against MySQL/Postgres in production, then running the test suite on SQLite. Copying a fulltext search query into a SQL Server migration target.","solutions":["On SQLite use FTS5 virtual tables directly via whereRaw, or switch to a LIKE-based search.","On SQL Server use CONTAINS/TABLE via whereRaw.","Restrict whereFullText to MySQL/Postgres and provide a portable fallback search for other engines."],"exampleFix":"// before\n$query->whereFullText(['title', 'body'], $term);\n\n// after (portable fallback)\n$driver = $query->getConnection()->getDriverName();\nif (in_array($driver, ['mysql','pgsql'])) {\n    $query->whereFullText(['title','body'], $term);\n} else {\n    $query->where('title', 'like', \"%{$term}%\")\n          ->orWhere('body', 'like', \"%{$term}%\");\n}","handlingStrategy":"validation","validationCode":"$driver = $query->getConnection()->getDriverName();\nif (in_array($driver, ['mysql','pgsql'])) {\n    $query->whereFullText(['title','body'], $term);\n} else {\n    $query->where('title', 'like', \"%{$term}%\")->orWhere('body', 'like', \"%{$term}%\");\n}","typeGuard":"function supportsFullText(\\Illuminate\\Database\\Connection $connection): bool\n{\n    return $connection instanceof \\Illuminate\\Database\\MySqlConnection\n        || $connection instanceof \\Illuminate\\Database\\PostgresConnection;\n}","tryCatchPattern":null,"preventionTips":["Provide a LIKE-based fallback search path for SQLite/SQL Server tests.","Document whereFullText as MySQL/Postgres-only.","Keep search-query code centralised to ease per-engine branching."],"tags":["fulltext","search","database-engine","sqlite","sqlsrv"],"analyzedSha":"bd6b5437e6ad87bb49f9b426724f07a9f64e9683","analyzedAt":"2026-08-06T00:28:32.783Z","schemaVersion":2}