nextcloud / nextcloud/groupfolders

[Bug]: Unified search filter "In folder" does not work

Open
#3,664 13 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug feature: search needs info
Dominant language
PHP
Stars
343
Forks
106
Avg merge
2d 3h
Merged PRs (30d)
34

Description

⚠️ This issue respects the following points: ⚠️
Bug description

On Unified search, when I try to use the "In folder" filter, no results appear. It always returns "No matching results", no matter what I search for.

Steps to reproduce
  1. Click on the "Unified search" button
  2. Click on "Spaces", then choose "In folder" (you need to be in the "Files" tab to use this filter)
  3. Select a folder that contains the file you are looking for and click "Pick"
  4. Enter your search query, e.g. "Acqu" for the file "Acquisition.doc"
  5. "No matching results" is returned

search with "in folder" filter

Expected behavior

The search should return the file I was looking for

search without "in folder" filter

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "yyyyyy.dom"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "overwrite.cli.url": "http:\/\/yyyyyy.dom",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "version": "29.0.6.1",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "defaultapp": "",
        "mail_smtpmode": "sendmail",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "default_language": "fr",
        "force_language": "fr",
        "theme": "",
        "loglevel": 2,
        "maintenance": false,
        "app_install_overwrite": [
            "approval"
        ]
    }
}
List of activated Apps
Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - bruteforcesettings: 2.9.0
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.1
  - files_downloadlimit: 2.0.0
  - files_fulltextsearch: 29.0.1
  - files_lock: 29.0.1
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - fulltextsearch: 29.0.1
  - fulltextsearch_elasticsearch: 29.0.1
  - groupfolders: 17.0.3
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - nextcloud_announcements: 1.18.0
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - survey_client: 1.17.0
  - systemtags: 1.19.0
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - encryption: 2.17.0
  - files_external: 1.21.0
  - forms: 4.3.0-alpha7 (installed 4.3.0-alpha7)
  - photos: 2.5.0 (installed 2.5.0)
  - support: 1.12.0 (installed 1.12.0)
  - suspicious_login: 7.0.0
  - twofactor_totp: 11.0.0-dev
  - user_ldap: 1.20.0
Nextcloud Signing status
Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- INVALID_HASH
		- dist/core-common.js
		- dist/core-common.js.map
		- lib/private/FullTextSearch/Model/IndexDocument.php
		- lib/private/Search/SearchQuery.php
		- core/css/server.css
- fulltextsearch
	- INVALID_HASH
		- js/fulltextsearch.v1.api.js
		- js/fulltextsearch.v1.result.js
		- lib/AppInfo/Application.php
		- lib/Model/SearchRequest.php
		- lib/Search/UnifiedSearchProvider.php
		- lib/Service/ConfigService.php
		- templates/navigate.php
- files_pdfviewer
	- INVALID_HASH
		- js/files_pdfviewer-main.js
		- js/files_pdfviewer-main.js.map
- viewer
	- INVALID_HASH
		- css/main-Y8hU2k5s.chunk.css
- groupfolders
	- INVALID_HASH
		- js/groupfolders-vendors-node_modules_vue-material-design-icons_Cancel_vue-node_modules_vue-material-design-ic-7c522f.js
		- js/groupfolders-vendors-node_modules_vue-material-design-icons_Cancel_vue-node_modules_vue-material-design-ic-7c522f.js.map
- fulltextsearch_elasticsearch
	- INVALID_HASH
		- lib/Service/SearchMappingService.php
- password_policy
	- EXCEPTION
		- OC\IntegrityCheck\Exceptions\InvalidSignatureException
		- Signature data not found.
- settings
	- INVALID_HASH
		- l10n/fr.js
		- l10n/fr.json
		- lib/Mailer/NewUserMailHelper.php

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [dist/core-common.js] => Array
                        (
                            [expected] => 6ae0f47bdaf552a36a5195ca421407d90871142c4d5c4fa76b27b9c1c905e76fdc604ddd9c68dc3f31af2634c1f58e973cb41023d86d6a9bbd829ed218a03a72
                            [current] => 6db88a38eaf5595ed6f6179347fc0fea019ca96ad9c2848897f299c118b8f80566339881bd329489efbcdb602f36d73b029c93b937561e7daeb0226f3c0f7276
                        )

                    [dist/core-common.js.map] => Array
                        (
                            [expected] => c056eceee5def0e7b1c936a4769c5f0f60f1b65c16ce9f858269d86d603154dcb57b85c1b977e8e71b20591ff6c7d69cb443946cbab2358221b995f53ebb36b3
                            [current] => a13282df19596bb02ae7002fb464966a8e68b177f6327bc462ccb270b1fcacf0bb3fe89c65f1e5d86c8d84745e25d659430537915fb4bb858a315bd2a6da3419
                        )

                    [lib/private/FullTextSearch/Model/IndexDocument.php] => Array
                        (
                            [expected] => ae78c66eaa226642b14992955ac337dd18f083ce21a86a6627696bdbf64642481e461f80b4805c2fafff9ddcd4491bc83fae866c957918ee0811ced391620045
                            [current] => 09bfde4057783c63e4fa1a7398c51844ae243f8d2b22cc2b8b566451ce65765b1b9118eb01fcf09877664b2f34458a2c8d73565346b8cacbab195c5386b9a46e
                        )

                    [lib/private/Search/SearchQuery.php] => Array
                        (
                            [expected] => 0a422f865f2b9e11defeada561c68aef20ba441f6957c24fa9e38aad4cda35e4529d8a843cb78a584d9a039ff3c424d2c166cdeeb0c2c5a1891439b9217f4043
                            [current] => 7a8b5c5af568a6de2ef98594093285224a8567bbaf90fd867a479a4a1bb86fb087275306f2357761924d04aa787b1e7dcb0a5d31965a16ea85d81194b01663f1
                        )

                    [core/css/server.css] => Array
                        (
                            [expected] => 114399842d9f0a7b9ddf2673ff695da2ddcf557625e2cf16ae0716b9f9b27803cb0e2eee502332eae739db815c00b26894e1e0a3463e3b66b32ac7901b969da4
                            [current] => fc767a676b623dab0b218ec63b3aaebbecd597cc67b604a47673a60bf76a78dba2656f2aabd16aca6cd52d322fc8e4dbad4bebf43463fd87e6b881ae0eb726fa
                        )

                )

        )

    [fulltextsearch] => Array
        (
            [INVALID_HASH] => Array
                (
                    [js/fulltextsearch.v1.api.js] => Array
                        (
                            [expected] => 286190fd53f761152e6da02cc18cd4fd994d02840824f73a40674f8e33565d35d82ad04dceed8bd6d23c2a51637e7973022e6108beb21bafb65e232785f078de
                            [current] => 8807af82b3bc5e9b51145b46f0660125d3ea524de47cff3b41d8bd926050b2b33fa60ea763bae4ff8629dc7568ff962554a485f5718971fb10d4901f2f4e3220
                        )

                    [js/fulltextsearch.v1.result.js] => Array
                        (
                            [expected] => 7565dc104cfb299d43fd2ea445c16f514a42c69e25c25b2374b730236e90b64f60101c8081f63fc1e3c276c4ae1d31d71f29d49f200272360d0cb1ec2d981628
                            [current] => 81a18ce8604b775de1ead4310a771c5368cea7090d0362004b51fe9fb006f60f3b5fce86d25152fa5ae6a1ea92a458a43843d044b66f0d713405a96537c28115
                        )

                    [lib/AppInfo/Application.php] => Array
                        (
                            [expected] => 1c2176c27a6563e760fedd53f7c74d4c684a546de3c008635c0d2a00af4b69f8a9724b7e17a98c4b47a608e58f1c0ecb21fdfd331b3c59698bf71568bfe3541a
                            [current] => 5a05a201b9b84255a278db7515ad7a08090149ddb3c7c3e73c82d93913b6781b1117ef1ec6f633088a9ba0acce181aafa908e6bb97edafc27bbcfbf89001bed9
                        )

                    [lib/Model/SearchRequest.php] => Array
                        (
                            [expected] => 1d5bd724ae5557155e177331057e506e8fb982c8b96fbc98e81283dbeb6f3d5db5753de50d8c76c440fecfbf9375bdeb4063555c0e3262e2edb8607836b5d126
                            [current] => d400451e9146b687638b8729c84ce7d161052efdf2c273360e2d8b90defc1ed0638b029c43a01c63860d773fb46a21383a73b51e08eac4402d52d5c85a864432
                        )

                    [lib/Search/UnifiedSearchProvider.php] => Array
                        (
                            [expected] => ed9ad4438464bb71d39bd49ee7e0d908740692f34c289f088b9661c99c37b43f5aef6043085a86cdf46b56fd0c7e81483bd3df3db6f45595f7986fbf1cefb338
                            [current] => 945633f9ace06b88e761ef3eba6e415ccd7c3b54ee153d2ac558d08519585557a88384fc3e8fef90252a40595375b38d9de5afd90d3a4dcf8aea35f5cea1037d
                        )

                    [lib/Service/ConfigService.php] => Array
                        (
                            [expected] => 35e1d0ffc95372ca5a1c54c08a2a1504be0b715efadc726703bc1869a83790f6a2605f209c169c4420b7e323e2d61ab09330fd534fefe6d93f47683a028a12e7
                            [current] => 85c7895c90b136bbb25b189468c305227f854b09856e6c56db5e3fcb432b6e926d593f4f572b67c3ffd571912d2fe8c7d31d225f1e6d98525c0c057bcdbbb121
                        )

                    [templates/navigate.php] => Array
                        (
                            [expected] => c5b743a55607cacc10c40eb282552239e15297207daa65afb16c52d20e7a204329418219b51c0d4f96f6f7e19a93bbe6c15dfa43feb68aa3875eb4cdb400eafe
                            [current] => bf0e2851323174905a56b20ec94a967ed01c67d776ddb2ee7e7ef815599256d036c9a37920c6e4da17d61481be4bf8fac5f3ddb10faef47e010ebf4d83d301cd
                        )

                )

        )

    [files_pdfviewer] => Array
        (
            [INVALID_HASH] => Array
                (
                    [js/files_pdfviewer-main.js] => Array
                        (
                            [expected] => 05bb55da2a3486462f11ae2f1bf4e85b846e5db0df7bdaf228b5379d2622a3e8bb87b60efd65bd0d8163e38456dea58f76f919da74c08ec6132edad43bfc9f99
                            [current] => 38fa9764bdd1b74379f5e2b9564c9a237e46bf80f118d8a84fbc65bf1003cc12ba46587cebe632eb03cf6a6882bf116c417a99951882b3102db8e016687a4d82
                        )

                    [js/files_pdfviewer-main.js.map] => Array
                        (
                            [expected] => 3f0abd4d8c4c79014f6983a4b77825018103338531d684adcadb0835d899e137cad151a552d557d5e15eef6eb9ab280ed3ee0c90581e2b9fdbef3fade2e3ae03
                            [current] => 769c63619a33c256fb15ba1d389c02b3da2255b1dec38f7ba0a7a3bd9657c3267e3716bc75a9bd69e3c2c179a4888a8627fef2e6aaf051385df442c190d4196c
                        )

                )

        )

    [viewer] => Array
        (
            [INVALID_HASH] => Array
                (
                    [css/main-Y8hU2k5s.chunk.css] => Array
                        (
                            [expected] => 0d6d8c5a041118306195276d217e1cb6994fde314ce0df945e20c62491725970f7b41d9e9cd155b1c555b19f8b3caefdea24ec578e21ac3cf420700462495c6c
                            [current] => 4580dc362d0c6e218d5b18b3159f557d6ccfb88aaf95da3bd171c2f89c782b0d4ce8156885d85b13c6794b24920389b5b3dfc9d41fe13d6cf03bf2797b9059b4
                        )

                )

        )

    [groupfolders] => Array
        (
            [INVALID_HASH] => Array
                (
                    [js/groupfolders-vendors-node_modules_vue-material-design-icons_Cancel_vue-node_modules_vue-material-design-ic-7c522f.js] => Array
                        (
                            [expected] => d7824cb4914d7514013ef31e62c8f9df8b6e507d04663db4b0f286ef8aaf6c1661500a00c9824f0704362e4ba08befccda512d4f3b5a186319830cb39d3b402d
                            [current] => 1f0294ec001c3ec48803ea4b23ef7f4fac86af4c70321ae214626da9a68122a02be7cc078bae0cdcfe7a72473bc362c86c4cc8e64f284a89b0a17b38e0d0bbd5
                        )

                    [js/groupfolders-vendors-node_modules_vue-material-design-icons_Cancel_vue-node_modules_vue-material-design-ic-7c522f.js.map] => Array
                        (
                            [expected] => a997d8dc581ac7644a693cbac2a3aafde0081ad5df9a85d7acf5ef8b2243f1ed9f0242572bc2d370718891eef7f0a36437f285546b6d3a999e3c60f00a09502d
                            [current] => dfe24722d3cf3b7597cdb028dbb7b588295f1c01cc68784809977c2473fbf77b7375b95866bf5582b04e83b0d488c48ae38fece4f584b93acfb07d39964200ff
                        )

                )

        )

    [fulltextsearch_elasticsearch] => Array
        (
            [INVALID_HASH] => Array
                (
                    [lib/Service/SearchMappingService.php] => Array
                        (
                            [expected] => d47f80298a41f91422e34b82e013dca6584a5d505885ab0ff7dccb425fe1ba1a521b8377119721895f9cfebc48cdbeb46856447d15f1d683d85c1401a841aa07
                            [current] => 46fff25cd2f628116d67cede1d3aeba6faadc2717fc3c6abea60490a9852fcadab21c4ff17e4e2c957bb37ffd79b5dc874c3e69fcee2c3c0db9d12d99be9cb8f
                        )

                )

        )

    [password_policy] => Array
        (
            [EXCEPTION] => Array
                (
                    [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
                    [message] => Signature data not found.
                )

        )

    [settings] => Array
        (
            [INVALID_HASH] => Array
                (
                    [l10n/fr.js] => Array
                        (
                            [expected] => 1f8ae0272b02520bb4912a8725cd92cc4e508ef50dde6fd5c19b93fe58c34d786ddb4ac64353d38f280d823e6f0b03c5c23331262cfe895a1754a65b30d4d44a
                            [current] => 0cac70e5d78a5e034ebe996583076e4d1adce154b968a402116f8ccbc86948e3c261a2e807aca0ecbc9f90ce1c85061dede60b1b4972b316758dcb04e58f2c95
                        )

                    [l10n/fr.json] => Array
                        (
                            [expected] => 1657ff49219cbfadf67cff97890a896d36035c99a81a0b873f530474a7da75c0802451a3d702e781d52f06f9e959fa883c6cec46a948e58fb3e6265c55e64e46
                            [current] => 6d6c27f69ad0da6c22f2560e1298c60426a3a1a331075a8839bfd6aa6cee44b02984c78b23cf881148cfc74c8223c661f05bd31131280a144d53c111339c3742
                        )

                    [lib/Mailer/NewUserMailHelper.php] => Array
                        (
                            [expected] => eec9ca5f1d31a17122996c41e9711e490b2510fdf9cf24c4d54899d32bf378ff2924f29ece8cdff3f3c76587566ce2d5946597bb2f2727ad80e0a5d6fa287522
                            [current] => aea5874b0988b82dafbaae0ec8069e8b4426953ce0e0419410987057f2f8fec115b5b686b31a610f43a200c985527c5f67e71aaea28cc13314bc4fd9d5ea3478
                        )

                )

        )

)
Nextcloud Logs
Empty
Additional info

I encountered the same problem on master version (NC32).

Configuration report (NC32)

{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"yyyyyy.dom"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "pgsql",
"version": "32.0.0.0",
"overwrite.cli.url": "https://yyyyyy.dom",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"updater.release.channel": "git",
"installed": true,
"app_install_overwrite": {
"1": "forms",
"2": "fulltextsearch",
"3": "fulltextsearch_elasticsearch",
"4": "files_fulltextsearch"
},
"theme": "",
"loglevel": 2,
"maintenance": false
}
}

List of activated Apps (NC32)

Enabled:

  • activity: 5.0.0-dev.0
  • admin_audit: 1.22.0
  • bruteforcesettings: 5.0.0-dev.0
  • circles: 32.0.0-dev.0
  • cloud_federation_api: 1.15.0
  • comments: 1.22.0
  • contactsinteraction: 1.13.0
  • dashboard: 7.12.0
  • dav: 1.34.0
  • federatedfilesharing: 1.22.0
  • federation: 1.22.0
  • files: 2.4.0
  • files_downloadlimit: 5.0.0-dev.0
  • files_lock: 32.0.0-dev.0
  • files_pdfviewer: 5.0.0-dev.0
  • files_reminders: 1.5.0
  • files_sharing: 1.24.0
  • files_trashbin: 1.22.0
  • files_versions: 1.25.0
  • firstrunwizard: 5.0.0-dev.0
  • fulltextsearch: 31.0.0
  • fulltextsearch_elasticsearch: 31.0.0-dev.0
  • groupfolders: 20.0.0-dev.0
  • logreader: 5.0.0-dev.0
  • lookup_server_connector: 1.20.0
  • nextcloud_announcements: 4.0.0-dev.0
  • notifications: 5.0.0-dev.0
  • oauth2: 1.20.0
  • password_policy: 4.0.0-dev.0
  • privacy: 4.0.0-dev.0
  • profile: 1.1.0
  • provisioning_api: 1.22.0
  • recommendations: 5.0.0-dev.0
  • related_resources: 3.0.0-dev.0
  • serverinfo: 4.0.0-dev.0
  • settings: 1.15.0
  • sharebymail: 1.22.0
  • survey_client: 4.0.0-dev.0
  • systemtags: 1.22.0
  • text: 6.0.0-dev.0
  • theming: 2.7.0
  • twofactor_backupcodes: 1.21.0
  • updatenotification: 1.22.0
  • user_status: 1.12.0
  • viewer: 5.0.0-dev.0
  • weather_status: 1.12.0
  • workflowengine: 2.14.0

Disabled:

  • encryption: 2.20.0
  • files_external: 1.24.0
  • files_fulltextsearch: 31.0.0-dev.0 (installed 29.0.1)
  • forms: 5.0.0 (installed 4.3.0-alpha7)
  • photos: 5.0.0-dev.0 (installed 2.5.0)
  • suspicious_login: 10.0.0-dev.0
  • testing: 1.22.0
  • twofactor_totp: 14.0.0-dev.0
  • user_ldap: 1.23.0
  • webhook_listeners: 1.3.0 (installed 1.3.0)
Nextcloud Signing status (NC32)

Integrity checker has been disabled. Integrity cannot be verified.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/Search/UnifiedSearchProvider.php and lib/Model/SearchRequest.php, then reproduce the Unified search “In folder” steps against a folder containing a matching file. Trace the selected folder through the search request and verify that the expected file is returned without the filter and with it.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.