简体   繁体   English

Rails全文搜索适用于“标准”查询

[英]Rails full text search appropriateness for “standard” queries

Gems such as Ransack make it easy to search models, but obviously do not work so well for full text fields such as descriptions or comments, so I have been thinking of using pg_search for all my searching (don't want to mix and match search solutions if possible) against any text field (names, descriptions, comments etc) and always doing full text searches as I can then search against any text field and get better results. 诸如Ransack之类的宝石使搜索模型变得容易,但显然对于诸如描述或注释之类的全文字段而言效果不佳,因此我一直在考虑使用pg_search进行所有搜索(不想混合和匹配搜索)解决方案)(针对任何文本字段(名称,说明,注释等)),并始终进行全文搜索,这样我就可以针对任何文本字段进行搜索,以获得更好的结果。 Are there any problems with using full text search in such a manner? 以这种方式使用全文搜索是否有任何问题?

好的,几个月后,当我实际使用了全文时,可以肯定地说,当您搜索非结构化文本以及使用SQL LIKE查找其他所有内容时,您都使用了全文!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM