Answer the question
In order to leave comments, you need to log in
How to simplify a query in PostgreSQL?
I have a query like:
SELECT id,
name,
ts_rank_cd(to_tsvector('russian', name), query)
FROM catalog_product,
to_tsquery('russian', 'телевизор') query
WHERE to_tsvector('russian', name) @@ query;
setweight( coalesce( to_tsvector('russian', name),''),'A') || ' ' ||
setweight( coalesce( to_tsvector('russian', array_to_string(items, ' ')),''),'B')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question