Search over a custom field model attributes has not a direct solution, the main problems I see are:
- jsonb format is not officially supported by pg_search see this
- custom fields are dynamic, while the list of attributes searchable is statically provided to the model, i.e:
multisearchable(
against: [:name, :charge_es, :charge_en, :charge_ca, :bio_es, :bio_en, :bio_ca],
...
Nevertheless I think it could be done with a bit of research and hacking on the pg_search gem (although it requires to deeply understand the queries behind the search).
Search over a custom field model attributes has not a direct solution, the main problems I see are:
Nevertheless I think it could be done with a bit of research and hacking on the pg_search gem (although it requires to deeply understand the queries behind the search).