[MySql] Add support for `fulltext` search with MATCH AGAINST function
This PR aims to complete the implementation started in this PR.
- Added a new
fulltextIndexfunction for the creation offulltext index. - Added a new
matchfunction that returns a class with anagainstmethod to be able to use the builder pattern as requested in this comment - Added a configuration option to be able to use all the modes of the fulltext search.
- Added corresponding tests.
The user should now be able to use it as follows:
select()
.from(users)
.where(
match(users.name, users.bio)
.against("drizzle*", {
mode: "boolean"
}));
Please note that the fulltextIndex function would address #1018 but won't do anything on it's own as it needs to be supported by Drizzle-kit when creating a migration.
I will add drizzle-kit support for that and then merge this PR. Will keep you updated here
I was trying to change the base branch for this PR but it's apparently not possible
Would love to see this merged!
Hi, anyone knows what's the status on this PR? Would love to use this feature on a planetscale db
Are there plans on merging this pull request?
Any updates on this? Currently having to use planetscale branching, and manually adding fulltext indexes through the planetscale console on every schema change that get's merged to production.
Sadly this is a gamebreaker for me and I will need to move to different orm until this is merged...
I'd also love to see this update merged.
@AndriiSherman has support for this landed in drizzle-kit? You don't accept pull requests in your drizzle-kit-mirror repository right?
Any news?
plan anytime soon to merge this PR? I'd love to use this feature :)
How about this ? @Angelelz
select()
.from(users)
.where(
match(users.name, users.bio)
- .against("drizzle*", {
- mode: "boolean"
- }));
+ .against("drizzle*", "boolean")
+ );
That would be closer to SQL syntax.
Maybe the variable naming should be more like in MySQL for example inBooleanMode.
select()
.from(users)
.where(
match(users.name, users.bio)
- .against("drizzle*", {
- mode: "boolean"
- }));
+ .against("drizzle*", "inBooleanMode")
+ );
or
select()
.from(users)
.where(
match(users.name, users.bio)
- .against("drizzle*", {
- mode: "boolean"
- }));
+ .against("drizzle*", "booleanMode")
+ );
+1
+1
Any progress here?
+1