Is HAVE_SPOTLIGHT_BACKEND_ES missing from smbd?

reitermarkus

Cadet
Joined
Mar 23, 2023
Messages
3
Hello,

I roughly followed the tutorial at https://www.truenas.com/docs/scale/scaletutorials/communityrecommends/spotlightsupportsamba/ and now have `elasticsearch` and `fs2es-indexer` running, i.e. `fs2es-indexer search` is working as expected. However, `mdfind` is only reporting “Indexing enabled.” rather than “Server search enabled.” as the `fs2es-indexer` ReadMe suggests.

I noticed that


mentions the HAVE_SPOTLIGHT_BACKEND_ES feature for smbd, which seems to be missing on TrueNAS Scale 22.12.1.

Is this simply broken on Scale 22.12.1 or does anyone have the spotlight elasticsearch backend running successfully?

Is the spotlight elasticsearch backend supposed to work without the HAVE_SPOTLIGHT_BACKEND_ES feature?
 

reitermarkus

Cadet
Joined
Mar 23, 2023
Messages
3
I now upgraded to 22.12.2, and I can confirm the feature is now included:
Code:
smbd -b | grep SPOTLIGHT
   HAVE_SPOTLIGHT_BACKEND_ES
   WITH_SPOTLIGHT

I installed elasticsearch and fs2es-indexer. I tested that elasticsearch is running by checking with curl 127.0.0.1:9200. fs2es-indexer is also working, since fs2es-indexer search --search-path /mnt/data/dataset --search-term something is returning results.

Services -> SMB is configured with
Code:
spotlight backend = elasticsearch
elasticsearch:address = 127.0.0.1
elasticsearch:port = 9200
and all relevant shares are configured with
Code:
spotlight = yes
veto files = /.DS_Store/
delete veto files = yes


However, when checking on a Mac with mdutil -s /Volumes/share, it still only says “Indexing enabled.” but not “Server search enabled.”
 

reitermarkus

Cadet
Joined
Mar 23, 2023
Messages
3
Okay, I added

Code:
rpc_daemon:mdssd = fork
rpc_server:mdssvc = external


to the global auxiliary parameters, but that doesn't seem to change anything. Not sure how to proceed debugging this.
 

phradr

Dabbler
Joined
Sep 27, 2022
Messages
49
There already have been a lot of discussions in this forum regarding the indexing feature of SMB within FN/TN. The most excessive one I found already started at FreeNAS times (LINK). Including debugging logs, alternative solutions and code reviews.

All that ended up in this post (LINK).

At the beginning of December 2023 a Jira Epic that covers this change was scheduled for the release of "SCALE-24.10-BETA.1" (LINK).

If you (or anyone else that is waiting for this feature to come) want to accelerate the ongoing process are welcome to follow @danb35 s advice (LINK) and vote up this change in Jira.
 
Top