Skip to content
FreeCORE

From 15.2, FreeCORE can answer Spotlight searches on its SMB shares. With the option on, FreeCORE keeps an index of the files in its SMB shares and the Finder’s search on a mounted share uses it, by name, kind, dates and size. Without it, a Mac searches a share by walking its folders over the network.

The option is off by default. TrueNAS® CORE 13.3 did not offer it.

  • The index lives on the system dataset, so the system dataset must be on a data pool, not the boot pool. Move it under System › System Dataset first. The option cannot be enabled while the system dataset is on the boot pool.
  • Encrypted datasets are never indexed, because the index itself is not encrypted. Locked datasets and Time Machine shares are left out too.
  1. Go to Services, find SMB, and click the Configure icon.
  2. Open the advanced options and select Enable Search (Spotlight).
  3. Click Save. The SMB service restarts.
SMB service advanced options with Enable Search (Spotlight) selected
FIG 1 SMB Spotlight Setting

The index is built once for every enabled share, then kept up to date. New, changed and removed files are picked up on their own, and a dataset added under a share is included. On a large share, the first pass takes a while. Until it finishes, results are incomplete.

Mount the share, open it in the Finder and search with the scope set to the share, not This Mac. Results respect permissions. The server checks each result as the user who searched, so a file that user cannot open is never shown. mdfind on the mounted share uses the same index.

FIG 2 Finder Search on a FreeCORE Share

Screenshot to come: a Finder search on a mounted FreeCORE share, scope set to the share, with results, on macOS.

  • Searching inside file contents (text, PDF, office documents), music and video tags, choosing shares one by one, and Windows search are not in this first version.
  • Turning the option off stops the indexer, and Spotlight answers nothing again. The index is removed with the system dataset.