Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite does not like full text index #125

Open
rabol opened this issue Oct 28, 2024 · 0 comments
Open

SQLite does not like full text index #125

rabol opened this issue Oct 28, 2024 · 0 comments

Comments

@rabol
Copy link

rabol commented Oct 28, 2024

As SQLite does not like the command to create fultext index, you could do something like this:

 if (DB::connection()->getDriverName() !== 'sqlite') {
            DB::connection(config('laravel-fulltext.db_connection'))->statement('ALTER TABLE laravel_fulltext ADD FULLTEXT fulltext_title(indexed_title)');
            DB::connection(config('laravel-fulltext.db_connection'))->statement('ALTER TABLE laravel_fulltext ADD FULLTEXT fulltext_title_content(indexed_title, indexed_content)');

        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant