Possibly this can just be done with SQL/models as-is now or look into [ransack](https://github.com/activerecord-hackery/ransack) or [searchkick](https://github.com/ankane/searchkick). Might affect #417