5
我们全文搜索使用一个GIN索引像这样本机查询:如何将@添加到postgres hibernate方言中?
CREATE INDEX idx_column1 ON table1 USING gin (to_tsvector('english', column1));
SELECT *
FROM table1
where to_tsvector('english', column1) @@ to_tsquery('searchedText')
然而,我们无法复制的HQL此查询,因为Hibernate错误的符号@。 如何将符号@添加到休眠方言?
Hibernate的人似乎认为这是奇怪的想做到这一点(“不可移植” ,“只使用Hibernate搜索”等),所以信息很难得到。 –
我希望这篇文章能帮助你 - http://java-talks.blogspot.com/2014/04/use-postgresql-full-text-search-with-hql.html –