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

feat(small): add searchProperty option for resource to allow custom property search #1460

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ulion
Copy link

@ulion ulion commented Apr 5, 2023

Currently, the default record search only searches in the "titleProperty". If we want to search within multiple fields or transform the content of certain fields, it is not possible.

With this PR, a "searchProperty" option is introduced for the resource. This allows us to specify a different field for the search when searching on the resource. The content of this field can be different from the title and can include any text that the user wants to search within. For example, for the User resource, we may want to search within user name, email, phone number, nickname, etc. Additionally, in some cases, we may want to support searching by a shortened version of the original text in some fields. To achieve this, we simply need to put the desired text into the "searchProperty" field, and the search will be performed accordingly.

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

Successfully merging this pull request may close these issues.

None yet

1 participant