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

Add dedicated field to freetext search indexes for recording custom search keywords for reports and contacts #9378

Open
jkuester opened this issue Aug 26, 2024 · 0 comments
Labels
Type: Feature Add something new

Comments

@jkuester
Copy link
Contributor

jkuester commented Aug 26, 2024

Is your feature request related to a problem? Please describe.
As a part of #9293 we are dramatically reducing the contacts/reports fields that will be indexed for freetext searching (e.g. using the search bar on the Reports or People tabs). Instead of indexing data from nearly all top-level fields on the docs, we will instead be indexing a specific hard-coded set of fields (e.g. name, person_id, etc).

However, it is possible that for some deployments there is a need to be able to search for data that is recorded in a custom field on the contact/report.

Describe the solution you'd like

The proposal here is to add an additional search_keywords field to be indexed by the freetext search views. This field would be empty by default, but can be auto-populated in the form when creating new reports/contacts. The data in the search_keywords just needs to be space-separated to be able to make the freetext search work so the forms could even be configured to combine data from multiple input fields and make it all searchable.

One known downside to this is that it would not be retroactive. If a project decides they want to index the phone field of a contact, they can update their forms to copy the phone value to search_keywords, but this will not affect the existing contacts. You would need a script to go copy the field for each existing contact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Add something new
Projects
None yet
Development

No branches or pull requests

4 participants
@jkuester and others