Hi, guys, is full text search broken on MySQL? All...
# orm-help
a
Hi, guys, is full text search broken on MySQL? All my queries seem to be failing even with previewFeatures on 😕
😕 1
a
Not sure on mysql, but you have to do some string manipulation for searches that involve spaces in Postgres
may be something similar
a
My query:
Copy code
prisma.customer.findMany({
   "where":{
      "organizationId":{
         "equals":"asdf"
      },
      "AND":[
         {
            "name":{
               "search":"+fern"
            }
         },
         {
            "archivedAt":{
               "equals":null
            }
         }
      ]
   },
   "skip":0,
   "take":15,
   "orderBy":{
      "createdAt":"desc"
   }
})
My model:
Copy code
model Customer {
  id                       String                   @id @default(cuid())
  createdAt                DateTime                 @default(now())
  updatedAt                DateTime                 @updatedAt
  name                     String
  username                 String
  email                    String?
  organization             Organization             @relation(fields: [organizationId], references: [id])
  organizationId           String
  @@unique([username, organizationId])
  @@unique([email, organizationId])
  @@fulltext([name])
  @@fulltext([username])
  @@fulltext([name, username])
}
I get this error:
Could it be because some of my filters and contained within the AND field? I do this to dynamically add filters 🤔
Nope, that is not it. It still fails without using
AND
a
sorry -- postgres doesn't have the same @@index stuff, so i'm not really familiar
a
Thank you for trying to help!
n
Hey Alex 👋 could you open a GitHub issue about this so that our Support and Engineering teams can look into the problem?
👍 1