feat: accept 2 characters Chinese/Japanese input to perform search action
Description
As some user mentioned years ago #25021, #9916 about not able to perform search with Chineses/Japanese characters with less than 3 characters query input, it turns out that there is the hard limit in the front end code that requires minimum 3 characters input to perform the query on the server side, otherwise it only query in the front-end within the current folder displayed.
Since the Chinese/Japanese words are more "condense" with their meanings, it is so common for their users to search with 2 words so with the word splitting mechanism used by search engines such as elastic search. So if we decrease the characters limit only for the Chinese/Japanese characters, it would not impact the server performance as some 2 characters English words would cause like "to", "go", "am" ext. And it is pretty easy to distinguish the Chinese/Japanese words only using the string match function on their encoding sequence which are adjacent.
Related Issue
- Fixes #25021, #9916
Motivation and Context
make the search experience a lot better for Chinese/Japanese users
How Has This Been Tested?
- test environment:
- test case 1:
- test case 2:
- ...
Screenshots (if appropriate):
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Database schema changes (next release will require increase of minor version instead of patch)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Technical debt
- [ ] Tests only (no source changes)
Checklist:
- [x] Code changes
- [ ] Unit tests added
- [ ] Acceptance tests added
- [ ] Documentation ticket raised:
- [ ] Changelog item, see TEMPLATE
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
oh damn it - we require a changelog :see_no_evil:
@timeswind mind opening another pr to add the changelog item? THX