I have enabled full text search for prisma and I would like to search the email
field returning all entries that match.
I got the following code:
const data = await this.prismaService.merchant.findMany({
where: {
email: {
search: '[email protected]',
},
},
});
This is working when I enter the exact email address. However, when I try to search for a part of it, i.e. 12rwqg13tr222vqfgedvqrw22@someprovider
, I get no results.
Do I have to create indexes to accomplish this? In the docs it is mentioned that I only need indexes for PostgreSQL if I want to speed up the queries. Am I missing something here?