nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.43k stars 3.97k forks source link

[Bug]: unified search filtering issues (space at end handling) #33653

Open Lionel-cl opened 1 year ago

Lionel-cl commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

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

  1. have 2 files named foo1.md and foo2.md
  2. have emails containing the word "foo"
  3. make a search with: foo (without space at this end)
  4. note the result
  5. add a space at the end of the search ("foo " without quotes) and note the difference in result
  6. add " in:files" (without spaces at the end) and note the result
  7. add a space to have " in:files " and note the result
  8. change "files" to "mail" and note the different behavior with "in:mail" and "in:mail"
  9. 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?

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

Lionel-cl commented 1 year ago

Hello, I tried the same thing with deck and files => same surprising result with or without space

With Mail, in my case, another problem arises: I notice the search does not work at all. Either it gives no email, or it gives all emails, regardless of the searched text. Does search work with Mail in HC24?

szaimen commented 1 year ago

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

XueSheng-GIT commented 1 year ago

I'm on 25.0.3 and can reproduce this issue. Adding a space to the search query seems to "block" the files search and provides only results of fulltextsearch.

joshtrichards commented 8 months ago

Also requested in nextcloud/android#8262