{"record":{"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/e0f6eb3518ac29fbbca8529e97d0df7fc9f24481/src/Illuminate/Database/Query/Grammars/Grammar.php#L819-L855","documentation":"The base Grammar's whereFullText throws by default. MySqlGrammar and PostgresGrammar override it (MySQL uses FULLTEXT indexes with MATCH...AGAINST; PostgreSQL uses tsvector/tsquery). SQLiteGrammar and SqlServerGrammar do not override it, so calling whereFullText on SQLite or SQL Server triggers the throw.","triggerScenarios":"Calling ->whereFullText(['title', 'body'], 'search term') on a SQLite (e.g., in-memory test DB) or SQL Server connection.","commonSituations":"Running the test suite against SQLite in-memory while production uses MySQL/PostgreSQL full-text search. Migrating from MySQL to SQL Server without updating full-text query calls.","solutions":["Switch to a MySQL or PostgreSQL connection — the only grammars that override whereFullText","On SQLite, use whereLike with LIKE/ILIKE operators as a fallback for simple text search","On SQL Server, use a raw WHERE CONTAINS clause: ->whereRaw('CONTAINS((title, body), ?)', ['search term'])","In tests, use a real MySQL/PostgreSQL instance via Docker instead of SQLite"],"exampleFix":"// before — fails on SQLite / SQL Server\nArticle::whereFullText(['title', 'body'], 'laravel tips')->get();\n\n// after — LIKE fallback for SQLite\nArticle::where('title', 'like', '%laravel tips%')->orWhere('body', 'like', '%laravel tips%')->get();","handlingStrategy":"type-guard","validationCode":"$driver = DB::connection()->getDriverName();\n\nif (in_array($driver, ['mysql', 'pgsql'])) {\n    $query->whereFullText(['title', 'body'], 'search term');\n} else {\n    $query->where('title', 'like', '%search term%')\n         ->orWhere('body', 'like', '%search term%');\n}","typeGuard":"function supportsFullText(): bool {\n    return in_array(DB::connection()->getDriverName(), ['mysql', 'pgsql']);\n}","tryCatchPattern":"try {\n    $query->whereFullText(['title', 'body'], 'search term');\n} catch (\\RuntimeException $e) {\n    if (str_contains($e->getMessage(), 'fulltext')) {\n        $query->where('title', 'like', '%search term%')\n              ->orWhere('body', 'like', '%search term%');\n    } else {\n        throw $e;\n    }\n}","preventionTips":["Check the driver name before calling whereFullText in multi-DB applications","For SQLite tests, use LIKE-based fallback or switch to a MySQL/PostgreSQL test container","Document full-text search as MySQL/PostgreSQL-only in project docs"],"tags":["fulltext","search","sqlite","sqlserver","database"],"backgroundTag":null,"analyzedSha":"e0f6eb3518ac29fbbca8529e97d0df7fc9f24481","analyzedAt":"2026-08-11T20:52:37.562Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}