Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow SearchFields to be one-to-many with the model #12559

Open
lb- opened this issue Nov 10, 2024 · 0 comments
Open

Allow SearchFields to be one-to-many with the model #12559

lb- opened this issue Nov 10, 2024 · 0 comments

Comments

@lb-
Copy link
Member

lb- commented Nov 10, 2024

This issue has been created from an older PR #11118

Is your proposal related to a problem?

It would be good to be able to simplify the model field configuration, allowing future upgrade paths with more consistent naming of internally used indexed fields.

Describe the solution you'd like

Allows any wagtail codebase to have multiple indexed fields (e.g. SearchField, etc) for any given model field. This can be useful if e.g. you would like to use different analysis or tokeniser settings for multiple ways of indexing a single model field.

Extends BaseField to contain a model_field_name attribute that defaults to field_name. Creates a new IndexedField that can hold the config to allow the Indexed model to generate multiple SearchField, AutocompleteField, FilterField objects from one.

Additional context

Working on this

Anyone can contribute to this, however, we encourage investigation into ideas and suggestions before raising a PR.

View our contributing guidelines, add a comment to the issue once you’re ready to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant