Julian
06/14/2022, 1:29 PMfirstName
, lastName
, street
, houseNumber
, and if I only provide a name John Doe
it should return all John Doe's. But if I search for John Doe Mainroad 15
it should only return the John Doe on Mainroad 15.
I currently have a OR: []
clause with contains
/`search` conditions, but because of the OR
it also returns all entires with house number 15. But with AND
it would not return any result, so I can't use that either.Nurul
06/14/2022, 3:18 PMJulian
06/14/2022, 5:42 PMto_tsvector
and to_tsquery
, and do a findMany
with where: { id: { in: [list of IDs from raw query] } }
to include relationships and take/skip logic.Nurul
06/21/2022, 1:30 PM