简体   繁体   English

使用ruby on rails中的pg_search限制全文搜索之前的域名

[英]Limit domaing before full text search using pg_search in ruby on rails

Is there to specify a limited table domain for being searched using pg_search ? 是否指定使用pg_search进行搜索的有限表域?

I'm thinking about using a number of chained calls to where on the ActiveRecord model before issuing a pg_search scoped search. 我正在考虑在发出pg_search范围搜索之前对ActiveRecord模型上的where使用多个链式调用。

The latest version has the ability to operate on the results returned by where or order etc. 最新版本能够根据whereorder等返回的结果进行操作。

So you can perform a search such as: 所以你可以执行搜索,例如:
YourModel.where(id: "some condition").search("query")

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

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