Limit domaing before full text search using pg_search in ruby on rails
-
28-06-2021 - |
Question
Is there to specify a limited table domain for being searched using 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.
Solution
The latest version has the ability to operate on the results returned by where
or order
etc.
So you can perform a search such as: YourModel.where(id: "some condition").search("query")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow