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.

@ulion ulion force-pushed the feat/search_property branch from d0db26c to 34f7b1c Compare April 10, 2023 02:16
@ulion ulion force-pushed the feat/search_property branch from 34f7b1c to 2d790fc Compare April 10, 2023 02:18
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.

1 participant