-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
feat: FullText Search in laravel-oci8 #800
base: master
Are you sure you want to change the base?
feat: FullText Search in laravel-oci8 #800
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes and maybe add an orWhereFullText test as well.
Added!! Thanks for remember! |
Relevant issues have been addressed... Now it is possible to utilize the "orWhereFullText()" and the option "labelSearch" not need passing in the "$options" of the "whereFullText()" method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, tested locally and everything seems to work as expected. Looks good to me.
Everything looks correct except for multiple column fullText: $table->fullText(['name', 'username', 'email'], 'users_fulltext_search'); ErrorError Code : 29851
Error Message : ORA-29851: cannot build a domain index on more than one column
Position : 51
Statement : create index users_fulltext_search on users (name, username, email) indextype is ctxsys.context parameters ('sync(on commit)')
Bindings : []
(Connection: oracle, SQL: create index users_fulltext_search on users (name, username, email) indextype is ctxsys.context parameters ('sync(on commit)')) Tested on |
…nd multiples indexes
@jonas-elias thank you for the updates. We will review it as soon as we can. Ping @hpacleb ^_^ |
Any updates on this? |
Updated and targeted to master (Laravel 11) branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good. For checking in actual projects.
Test Code$table->fullText(['name', 'username', 'email'], 'users_fulltext_search'); Error
Encountered the error above which might be due to Oracle23ai free docker instance. Using a single column, the PR seems to work fine: $table->fullText('name', 'users_fulltext_search'); |
2 Tests failing:
|
Title 😎
Hello, this pull request implements the "whereFullText()" method for laravel/oci8.
Description 🤯
The implementation utilizes the CONTAINS Oracle feature to perform a text search using the ctxsys.context index. To facilitate the creation of the index, a migration method named "fullText(nameColumn)" is included.
Additional notes 🤨
I have made modifications to the "testDropAllTables()" method to incorporate a constraint for secondary tables created by Oracle. This change prevents an error when dropping secondary tables whose parent tables have text reference indexes, and ensures the proper disposal of secondary tables (Oracle's automatic cascade). The relevant column "SECONDARY" is described in the documentation (references 3 and 4).
Running tests 🚀
./vendor/phpunit/phpunit/phpunit --filter=testWhereFullText
./vendor/phpunit/phpunit/phpunit --filter=testOrWhereFullText
References 🖥
Please review the changes, and if everything looks good, consider merging the pull request. Thank you 😁!