Spotlight search with tracker

I have gotten spotlight search mostly working over AFP using tracker using these steps. AFP should be running before starting this.
Run the following as root:

yum -y install dconf dbus-x11 tracker<br>echo 'export XDG_DATA_HOME="/var/netatalk/";export XDG_CACHE_HOME="/var/netatalk/";export DBUS_SESSION_BUS_ADDRESS="unix:path=/var/netatalk/spotlight.ipc";' > ~/.tracker_profile<br>echo '[ -f ~/.tracker_profile ]&amp;&amp;. ~/.tracker_profile' >> ~/.bash_profile<br>. ~/.tracker_profile<br>gsettings set org.freedesktop.Tracker.Miner.Files index-recursive-directories "['/mnt2']"<br>dbus-daemon --session --fork --address="unix:path=$PREFIX/var/netatalk/spotlight.ipc"<br>tracker-control -s<br>sed -i '/\\[Global\\]/ aspotlight = yes' /etc/afp.conf<br>killall -HUP afpd

Tracker will start crawling and indexing your files and they should soon show up in spotlight searches. You can check the indexing status with ‘tracker-control -S’ or do a search of the index with 'tracker-search KEYWORD'

However, on reboot the index is empty and tracker does not try and reindex any of the files. If restarted with ‘tracker-control -ts’ tracker will start indexing the files from scratch and then all will work until next reboot. I am still investigation this, but think it might be that tracker is started before the shares are mounted so it just sees an empty directory and removes the files from its index.

I am interested in understanding this more. Thanks for sharing. Perhaps we can support this as a Rock-on

I do not have any experience with docker so I don’t know how plausible that is. Normally Netatalk starts tracker and communicated with it over d-bus.

Extra info is at http://netatalk.sourceforge.net/3.1/htmldocs/configuration.html#idp139639181855360 and http://jahav.com/blog/tracker-fulltext-search-from-cli/

Samba, which also has spotlight support, uses a similar but more complicated setup that runs tracker as its own user for security. I don’t know if it is currently possible to have both Samba and Netatalk running off the same instance of tracker. Hopefully Samba will eventually add MS-WSP so Windows boxes can also get indexed network search

https://wiki.samba.org/index.php/Spotlight

Time to revive this. I’ve created an issue: https://github.com/rockstor/rockstor-core/issues/690

At the very least, we should look into supporting Samba spotlight.