[Bug]: unified search filtering issues (space at end handling)
未关闭
还没有人认领这个 Issue。
0. Needs triage
25-feedback
bug
feature: search
- 主要语言
- PHP
- 星标
- 36.9k
- 派生
- 5.2k
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 713
描述
⚠️ 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 (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
- The search result varies depending on whether or not there is a space at the end of the search.
- This behavior is different depending on the app (in:files or in:mail)
- except error before: "date" does not work. or where to find the possible filters and instructions for use.
To clarify these points, the easiest way is to watch the short video here https://drive.google.com/file/d/1iOH51EFZBmparcEGdJga9GePBZLbD9oz/view
Steps to reproduce
- have 2 files named foo1.md and foo2.md
- have emails containing the word "foo"
- make a search with: foo (without space at this end)
- note the result
- add a space at the end of the search ("foo " without quotes) and note the difference in result
- add " in:files" (without spaces at the end) and note the result
- add a space to have " in:files " and note the result
- change "files" to "mail" and note the different behavior with "in:mail" and "in:mail"
- add: "before:2021" (with old mails dating from 2021 and 2020) and note the issue again
Expected behavior
always the same mode of operation. A space at the end of the entry must not influence the search result.
Installation method
Community Docker image
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
No response
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
Enabled:
- accessibility: 1.10.0
- activity: 2.16.0
- calendar: 3.4.2
- circles: 24.0.1
- cloud_federation_api: 1.7.0
- comments: 1.14.0
- contacts: 4.2.0
- contactsinteraction: 1.5.0
- dashboard: 7.4.0
- dav: 1.22.0
- deck: 1.7.1
- federatedfilesharing: 1.14.0
- federation: 1.14.0
- files: 1.19.0
- files_accesscontrol: 1.14.1
- files_pdfviewer: 2.5.0
- files_rightclick: 1.3.0
- files_sharing: 1.16.2
- files_trashbin: 1.14.0
- files_versions: 1.17.0
- files_videoplayer: 1.13.0
- firstrunwizard: 2.13.0
- groupfolders: 12.0.1
- impersonate: 1.11.0
- logreader: 2.9.0
- lookup_server_connector: 1.12.0
- mail: 1.13.8
- nextcloud_announcements: 1.13.0
- notifications: 2.12.0
- oauth2: 1.12.0
- password_policy: 1.14.0
- photos: 1.6.0
- privacy: 1.8.0
- provisioning_api: 1.14.0
- recommendations: 1.3.0
- serverinfo: 1.14.0
- settings: 1.6.0
- sharebymail: 1.14.0
- spreed: 14.0.4
- support: 1.7.0
- survey_client: 1.12.0
- systemtags: 1.14.0
- text: 3.5.1
- theming: 1.15.0
- twofactor_backupcodes: 1.13.0
- updatenotification: 1.14.0
- user_status: 1.4.0
- viewer: 1.8.0
- weather_status: 1.4.0
- workflowengine: 2.6.0
Disabled:
- admin_audit
- encryption
- files_external
- user_ldap
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定源文件、测试或入口点。首先复现带有尾随空格的步骤,比较文件和邮件中的统一搜索以及 before:2021 过滤器。完成的标准是尾随空格不再改变结果,并且在所描述的搜索模式之间行为一致。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php, postgresql
- 领域
- backend, search
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100