In postgres database we have a table table1 and with column column1 which type is text. And we created an index to that column CREATE INDEX idx_column1 ON table1 USING gin (to_tsvector('english', column1));
question is, why when we execute this query
SELECT *
FROM table1
where to_tsvector('english', column1) @@ to_tsquery('searchedText')
index is used, but by this query index is not used
SELECT *
FROM table1
where ts_match_vq(to_tsvector('english', column1),to_tsquery('searchedText'))
ts_match_vq(to_tsvector('english', column1) @@ to_tsquery('searchedText'))This does not work for me. The function is defined as expecting a ts_vector and a ts_query. In your example, you are passing a boolean to it, my 9.1 complains about this.