Skip to content

Allow to search over custom field attributes #3835

Description

@ferblape

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions