这将返回true SELECT to_tsvector('The quick brown fox jumped over the lazy j-80 dog') SELECT to_tsvector('The quick brown fox jumped over the lazy j-80 dog')
-- a typo, typing 9 instead
因此,我使用sequelize已经有一段时间了,在处理了elasticsearch之后,我决定利用postgres's对fts的支持。看起来就在今年年初,sequelize增加了对TSVector的支持,这是FTS实现所必需的。尽管我在任何地方都找不到任何文档。 The pull request 感谢所有的帮助!
VALUES (2, "All the Carmichael numbers")')我知道如何用Sqlite做这件事:
C.execute(“使用fts4(id整型,描述文本)创建虚拟表mytable2”)c.execute(“插入mytable2但缺点是每个查询关键字都必须拼写正确,也就是说,只有FTS才不允许拼
如果我用特殊字符串表示ex,这样的查询(我使用Postgres的全文搜索方法)
select object from Object objectwhere object.Id = :Id and fts('english',object.searchColumn,'Agenya\\&\&') = true order by object.objectName