David Hancu
10/02/2022, 8:08 AMpg_trgm
) ready for the next release of Prisma Util and I was wondering what you think about this configuration example. Should I change anything or keep it like this?
ftsIndexes: {
"base.prisma:Post": {
type: "GIN",
indexes: [{ language: "english", field: "title", weight: "A"}]
}
}
Nurul
10/03/2022, 1:00 PMDavid Hancu
10/03/2022, 5:25 PMprisma.post.findMany({
where: {
title: "query | sql"
}
});
All you have to do to enable this full text search support is to create the indexes in the configuration file and add the middleware to Prisma:
import middleware from "./middleware";
prisma.$use(middleware);