I’m trying to use full text search from the 2.30.0...
# prisma-client
g
I’m trying to use full text search from the 2.30.0 release in prisma, and I have this code
Copy code
const result = await db.package.findMany({
      where: {
        body: {
          search: "test",
        },
      },
    });
However, it’s throwing me an error, and I don’t know why. I have fullTextSearch enabled as a preview feature, and I even tried wiping node_modules & re-installing, and re-running
npx prisma generate
.
r
@Gautam Paranjape 👋 Do you have a field named
body
in your model?
g
Hmm, it’s not there, that’s odd
What should I do? Should I try to define the types by myself?
r
Could you share your schema? The body in the example is in the schema. You need to use the field you want based on your model.
g
Ohhh, I see
I thought body was how you access search, I didn’t know it was referring to a field
Hm, now the search filter doesn’t appear
r
Works fine for me. Should I send you an example?
Here’s the working copy:
g
Thanks, let me try that
That’s odd, it works there
Let me see if I’m doing anything wrong