Please i can't get FULLTEXT search to work on planetscale via prisma. Vercel always returns this error: "Cannot find a fulltext index to use for the search, try adding a @@fulltext([Fields...]) to your schema". I have already added and enabled The previewFeatures included in the application's Prisma file.
datasource db {
//provider = "sqlite"
provider = "mysql"
url = env("DATABASE_URL")
relationMode = "prisma"
}
generator client {
provider = "prisma-client-js"
previewFeatures = ["fullTextSearch", "fullTextIndex"]
}
model Coast {
proid Int @id @default(autoincrement())
serialid String
displayid String @unique @default(uuid())
zootype String
zoate String
zoty String
zoea String
zoal String
bone String
zoice Decimal @default(0)
postdate DateTime @default(now())
authorId String?
author Buser? @relation(fields: [authorId], references: [userID], onDelete: Cascade)
postsimage Postimg[]
@@index([authorId])
@@fulltext([zoate])
@@fulltext([zoty])
@@fulltext([bone])
@@fulltext([zoea])
@@fulltext([zootype])
@@fulltext([zoal])
}
It looks to me like the problem is my Prisma application isn't creating the necessary FULLTEXT indexes when I run my migrations or db push, which is why tried a workaround of creating them manually on planetscale. Why this isn't happening I don't know, but based on the other reports in the discussion at https://github.com/prisma/prisma/discussions/11249 it looks like a Prisma bug. can anyone help?