Skip to content

Take mount name into account when searching by filename. - #64152

Merged
icewind1991 merged 4 commits into
masterfrom
search-mount-name
Sep 22, 2026
Merged

icewind1991 merged 4 commits into
masterfrom
search-mount-name

Conversation

@icewind1991

@icewind1991 icewind1991 commented Sep 9, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Currently, searching only takes the filename as it exists in the filecache into account. This doesn't (always) work for the root of mounts though.

Renamed shares and the root of groupfolder/external storages aren't matched because their name in the filesystem isn't the same as the name for their cache entry.

This solves that by also taking the name of the mountpoint into account when searching

  • Add regex_substring to the query builder
  • Add mount_path_name as a field in the filecache search, which gets transformed to a substring of mount_path
  • Transform a dav search on filename to searching on both filename and mount_path_name

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@icewind1991
icewind1991 requested a review from a team as a code owner September 9, 2026 17:19
@icewind1991
icewind1991 requested review from Altahrim, leftybournes, provokateurin and salmart-dev and removed request for a team September 9, 2026 17:19
@icewind1991 icewind1991 added this to the Nextcloud 36 milestone Sep 9, 2026
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Sep 9, 2026
@icewind1991
icewind1991 force-pushed the search-mount-name branch 2 times, most recently from 73e2bf0 to 4b612c3 Compare September 21, 2026 15:21
Comment thread lib/public/DB/QueryBuilder/IFunctionBuilder.php Outdated
Comment thread tests/lib/DB/QueryBuilder/FunctionBuilderTest.php Outdated
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
…o the list of root ids

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991
icewind1991 merged commit 81df4ad into master Sep 22, 2026
192 of 194 checks passed
@icewind1991
icewind1991 deleted the search-mount-name branch September 22, 2026 16:31
@icewind1991

Copy link
Copy Markdown
Member Author

/backport to stable35

@icewind1991

Copy link
Copy Markdown
Member Author

/backport to stable34

@icewind1991

Copy link
Copy Markdown
Member Author

/backport to stable33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants