full Text Search not working with Postgres and Nextjs
Hello,
I have a problem with trying to use Full Text Search with Prisma ORM. I have followed the guide in Prisma docs, but I still get this error. I posted a snapshot of prima file and the code we have in the docs.
Here is the error:
Invalid prisma.question.findMany() invocation:
{
include: {
mc: true
},
where: {
body: {
~~~~
search: "cat"
},
? AND?: QuestionWhereInput | QuestionWhereInput[],
? OR?: QuestionWhereInput[],
? NOT?: QuestionWhereInput | QuestionWhereInput[],
? id?: IntFilter | Int,
? title?: StringFilter | String,
? tags?: StringNullableListFilter,
? category?: StringFilter | String,
? creator_id?: IntFilter | Int,
? created_at?: DateTimeFilter | DateTime,
? updated_at?: DateTimeFilter | DateTime,
? reviwer?: StringFilter | String,
? reviwed?: BoolFilter | Boolean,
? status?: StringFilter | String,
? version?: IntFilter | Int,
? stem?: StringFilter | String,
? score?: IntFilter | Int,
? notes?: StringFilter | String,
? mc?: ChoicesListRelationFilter,
? User?: UserScalarRelationFilter | UserWhereInput,
? Tests?: TestListRelationFilter
}
}
Unknown argument
at async POST (./app/api/questions/search/route.tsx:13:18)
I have a problem with trying to use Full Text Search with Prisma ORM. I have followed the guide in Prisma docs, but I still get this error. I posted a snapshot of prima file and the code we have in the docs.
Here is the error:
Invalid prisma.question.findMany() invocation:
{
include: {
mc: true
},
where: {
body: {
~~~~
search: "cat"
},
? AND?: QuestionWhereInput | QuestionWhereInput[],
? OR?: QuestionWhereInput[],
? NOT?: QuestionWhereInput | QuestionWhereInput[],
? id?: IntFilter | Int,
? title?: StringFilter | String,
? tags?: StringNullableListFilter,
? category?: StringFilter | String,
? creator_id?: IntFilter | Int,
? created_at?: DateTimeFilter | DateTime,
? updated_at?: DateTimeFilter | DateTime,
? reviwer?: StringFilter | String,
? reviwed?: BoolFilter | Boolean,
? status?: StringFilter | String,
? version?: IntFilter | Int,
? stem?: StringFilter | String,
? score?: IntFilter | Int,
? notes?: StringFilter | String,
? mc?: ChoicesListRelationFilter,
? User?: UserScalarRelationFilter | UserWhereInput,
? Tests?: TestListRelationFilter
}
}
Unknown argument
body. Did you mean id? Available options are marked with ?.at async POST (./app/api/questions/search/route.tsx:13:18)

