desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Spotlight Support (NSFileProviderSearching)

Open ferhaterdem opened this issue 10 months ago • 3 comments

⚠️ Before submitting, please verify the following: ⚠️

Bug description

Spotlight search, and also third party search tools like Find Any File, is not working as expected on macOS version Tahoe 26.2 with Nextcloud VFS Client version 4.0.5. Search results only include items that have been discovered (by opening the parent folder) or fully synchronized. Undiscovered items are not searchable.

Steps to reproduce

  1. install neweset version of nextcloud vfs on newest version on macOS and set it up.
  2. fully synced.
  3. searching via spotlight for a file
  4. no results

Expected behavior

Files should show up in Spotlight search.

Which files are affected by this bug

All files that are not downloaded, opened or seen.

Operating system

macOS

Which version of the operating system you are running.

Tahoe 26.2

Package

Official macOS Virtual files 12+ universal pkg

Nextcloud Server version

32.0.3

Nextcloud Desktop Client version

4.0.5

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

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • [x] Default internal user-backend
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Nextcloud Server logs


Additional info

Files can be found if the relevant folder has been clicked on beforehand and the contents of the folder have been viewed.

ferhaterdem avatar Jan 21 '26 11:01 ferhaterdem

This is a trade-off based on the conscious decision to not enumerate all remote content on start but only on demand. Spotlight can only discover what it finds in the file system. Oversimplified: Setting up a new file provider domain and not entering any child folder never tells the system anything about content beyond the top level.

That was changed last year because in some cases users have vast structures. Think about institutions which manage all their data in shared group folders and such. It puts a big load on the servers, if every newly set up client goes through all of that and also it results in long loading times on the client.

Luckily, the implementation of NSFileProviderSearching might make the content discoverable while avoiding the complete recursive enumeration.

I categorize this as a missing feature implementation rather than a bug because the file provider extension works as expected.

i2h3 avatar Feb 06 '26 13:02 i2h3

This is a trade-off based on the conscious decision to not enumerate all remote content on start but only on demand. Spotlight can only discover what it finds in the file system. Oversimplified: Setting up a new file provider domain and not entering any child folder never tells the system anything about content beyond the top level.

That was changed last year because in some cases users have vast structures. Think about institutions which manage all their data in shared group folders and such. It puts a big load on the servers, if every newly set up client goes through all of that and also it results in long loading times on the client.

Luckily, the implementation of NSFileProviderSearching might make the content discoverable while avoiding the complete recursive enumeration.

I categorize this as a missing feature implementation rather than a bug because the file provider extension works as expected.

Thank you for your feedback, and I understand the trade-off. However, it is misleading that «Integration with Spotlight» is advertised as a supported feature in the docs: https://docs.nextcloud.com/server/latest/user_manual/en/desktop/macosvfs.html

Yes, NSFileProviderSearching sounds like the solution. Are you planning to implement it?

jonasv1 avatar Feb 06 '26 15:02 jonasv1

it is misleading that «Integration with Spotlight» is advertised as a supported feature in the docs

The documentation sadly is outdated and due for an overhaul with the next big release in a few weeks.

Technically, the Spotlight integration is not really a feature of our client but just a neat side effect of placing content into an indexed directory. 😅 I do not know why this is listed as such, to be honest. It is not listed as such for the classic synchronization either.

Are you planning to implement it?

It definitely makes sense to add it and I updated the issue labels accordingly. Though, planning is a different topic which needs to be discussed with the team and management and I cannot state anything on a timeline for this.

i2h3 avatar Feb 09 '26 16:02 i2h3