core icon indicating copy to clipboard operation
core copied to clipboard

feat: accept 2 characters Chinese/Japanese input to perform search action

Open timeswind opened this issue 1 year ago • 3 comments

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

timeswind avatar Oct 14 '24 14:10 timeswind

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.

update-docs[bot] avatar Oct 14 '24 14:10 update-docs[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 14 '24 14:10 CLAassistant

oh damn it - we require a changelog :see_no_evil:

@timeswind mind opening another pr to add the changelog item? THX

DeepDiver1975 avatar Nov 08 '24 16:11 DeepDiver1975