Skip to content

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

Merged
DeepDiver1975 merged 1 commit intoowncloud:masterfrom
timeswind:patch-1
Nov 8, 2024
Merged

feat: accept 2 characters Chinese/Japanese input to perform search action#41328
DeepDiver1975 merged 1 commit intoowncloud:masterfrom
timeswind:patch-1

Conversation

@timeswind
Copy link
Copy Markdown
Contributor

@timeswind timeswind commented Oct 14, 2024

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

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)
  • 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:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

… action

As some user mentioned years ago 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.

It would make the search experience a lot better for Chinese/Japanese users.
@update-docs
Copy link
Copy Markdown

update-docs bot commented Oct 14, 2024

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.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Oct 14, 2024

CLA assistant check
All committers have signed the CLA.

@sonarqubecloud
Copy link
Copy Markdown

@DeepDiver1975 DeepDiver1975 merged commit 2fadb24 into owncloud:master Nov 8, 2024
@DeepDiver1975
Copy link
Copy Markdown
Member

oh damn it - we require a changelog 🙈

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

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.

How can I search with 2 letters?

3 participants