有没有指定一个有限的表域来使用 pg_search 进行搜索?
我正在考虑在发出 pg_search
范围搜索之前,对 ActiveRecord 模型上的 where
进行一系列链式调用。
最佳答案
最新版本可以对where
或order
等返回的结果进行操作
因此您可以执行如下搜索:YourModel.where(id: "some condition").search("query")
关于ruby-on-rails - 在 ruby on rails 中使用 pg_search 在全文搜索之前限制 domaing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12161468/