I have the following query that I did hard looking on this site:
SELECT *
FROM renns
WHERE
(
to_tsvector('english', coalesce(numar_admin, '')) ||
to_tsvector('english', coalesce(nume_strada, '')) ||
to_tsvector('english', coalesce(nume_prenume, ''))||
to_tsvector('english', coalesce(bloc, '')) ||
to_tsvector('english', coalesce(apartament, ''))
) @@ plainto_tsquery('english', '$q')
It works if I write in the variable $q
all the text that appears in one of the columns present in the query. For example: cherry
I would like to write only: cher
and return all rows fields in which it finds this string: “cher”.