[Bug]: "Search everywhere" returns no result if search term is short
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
When the search term is short (< 3 char), the search everywhere page (/apps/files/search?query=xx) shows no result instead of a good error feedback. This can cause very confusing behavior.
Take this screen recording from the demo site for example,
- User searched for "ne" => got result => good
- User clicked "search everywhere", probably expect to get more result => instead, saw a "no result" screen
- User enter more chars and the result behave normally
https://github.com/user-attachments/assets/d1fe5766-b71d-42a3-b724-7e97ff4603f6
Steps to reproduce
- Navigate to
/apps/files/search?query=xxand observe that it will never return a result no matter what the query is
Expected behavior
Not really sure,
Maybe we should show another error message, but it will still be confusing consider that clicking "search everywhere" erase the result.
Or maybe we should just search anyway
Additional info
I discovered this issue because I'm dealing with CJK characters, I also noticed that an PR #21777 a while ago reduced search limit to 2 chars, is there any reason that this page has the 3-char limit?
As for the env, It's reproducible on the demo site, so the env is whatever that env is.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the short-query behavior at /apps/files/search?query=xx and trace the search-everywhere entry point from the files app. Check how the two-character query is handled and confirm the intended behavior with maintainers, since the issue leaves the expected result undecided; done should include clear short-query behavior and regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- frontend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100