Open
Description
Currently, we get all documents matching the search expression and then filtering them by hand. To increase performance, one should instead use postgres fulltext search. Prisma is now supporting this: https://www.prisma.io/docs/concepts/components/prisma-client/full-text-search
But there are still a few limitations (e.g. the index needs to be handled externally). Thus, let's wait a bit until that feature is fully implemented.
Should also sort by relevance https://prisma.io/docs/concepts/components/prisma-client/filtering-and-sorting#sort-by-relevance-postgresql
Depends on: