PostgreSQL: Full Text Search - How to search partial words?

后端 未结 6 1215
情书的邮戳
情书的邮戳 2020-12-07 23:23

Following a question posted here about how I can increase the speed on one of my SQL Search methods, I was advised to update my table to make use of Full Text Search. This i

6条回答
  •  一生所求
    2020-12-07 23:50

    @alexander-mera solution works great!

    Note: Also make sure to convert spaces to +. For example, if you are searching for squire knight.

    SELECT title FROM movies WHERE to_tsvector(title) @@ to_tsquery('squire+knight:*')
    

提交回复
热议问题