OMV6, SMB and Elastic Search for MacOS Spotlight

  • Hi,

    Does anyone have a good tutorial on how to install/connect SMB with Elasticsearch in an OMV6 system? So it should be possible that Spotlight from macOS can use the Elastic Search database to find almost instant stuff on the NAS.


    Would be great.

  • Why do you need SMB for elasticsearch? Elastic stack uses api,not direct data communication

    I don't need SMB for elastic search. I need smb for file sharing. And from Debian 11 on the SMB version 4.12. it is capable of using elastic search for indexing. And spotlight use this.

    LINK

    I am afraid of breaking something in the OMV6 installation.

  • Aha,really interesting. I work with elasticsearch everyday, never seen this. As for the configuration, they are probably using oss version of elasticsearch 7.10.2. The only problem that i could see if chaning smb.conf file, which can be overwritten if you configure something else on samba in the GUI.

  • Aha,really interesting. I work with elasticsearch everyday, never seen this. As for the configuration, they are probably using oss version of elasticsearch 7.10.2. The only problem that i could see if chaning smb.conf file, which can be overwritten if you configure something else on samba in the GUI.

    At the samba.org site they write, that you have enter the [global] and [share] parts

    Code
       [global]
       spotlight backend = elasticsearch
       elasticsearch:address = localhost
       elasticsearch:port = 9200
    
       [share]
       ...
       spotlight = yes

    I think you do it in the OMV "advanced options" fields. Am I right?

  • Update:

    It works like a charm. There are some issues with elastic search 7 and fs2es-indexer, but i solved it.

    Use this tutorial with fs2es-indexer


    You have to change this in setup.py in the fs2es-indexer folder if you use elastic search 7 :


    install_requires=[

    'PyYaml',

          'elasticsearch>=7.0.0,<8.0.0'


    and you have to uncomment in /etc/fs2es-indexer/config.yml :


    library_version: 7


    and in the SMB Global section in OMV you have to use:


    spotlight backend = elasticsearch

    elasticsearch:address = 127.0.0.1

    elasticsearch:port = 9200



    then it should run and you can search filenames and filename fragments in MacOS finder very very quick.

    If you want to search content then you have to use scrawler. But I have not tried it yet. Perhaps anybody else have done it and could explain here the method of install?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!