Fix for Qsirch and Spotlight
-
- Starting out
- Posts: 39
- Joined: Wed Feb 12, 2020 10:39 pm
Fix for Qsirch and Spotlight
I had a problem - no spotlight support through OS X on Catalina and Mojave machines but I think I may have fixed it.
Back in ye olden days before Apple was run by an accountant instead of a visionary, I had an OS X Server box to serve files to my mac users. One day I updated the server OS to a new version and all of a sudden spotlight server stopped working. The fix was to give the user "_spotlight" read only access to the shares.
With this in mind I added a user "_spotlight" and set a very secure password for them. I then gave this user read only access to the Shared Folders and then propagated these using the "Apply and replace all existing permissions of this folder, files and subfolders" in the "Edit Share Folder Permissions" dialog box from the "Privilege" control panel.
Low and behold it works. I'm only allowing my client Macs to connect via SMB3, something that you can set in "Advanced Options" dialog from "Win/Mac/NFS" settings in the "Network & File Services" Control Panel. Set the Highest and Lowest SMB version to 3. The QNAP is a TS-873 running 4.4.1.146 (Build 20191206) Firmware.
I've had a ticket open with QNAP since 22nd of January and was sick of the lack of reply so I took matters into my own hands.
Hope this helps someone!
MB
Back in ye olden days before Apple was run by an accountant instead of a visionary, I had an OS X Server box to serve files to my mac users. One day I updated the server OS to a new version and all of a sudden spotlight server stopped working. The fix was to give the user "_spotlight" read only access to the shares.
With this in mind I added a user "_spotlight" and set a very secure password for them. I then gave this user read only access to the Shared Folders and then propagated these using the "Apply and replace all existing permissions of this folder, files and subfolders" in the "Edit Share Folder Permissions" dialog box from the "Privilege" control panel.
Low and behold it works. I'm only allowing my client Macs to connect via SMB3, something that you can set in "Advanced Options" dialog from "Win/Mac/NFS" settings in the "Network & File Services" Control Panel. Set the Highest and Lowest SMB version to 3. The QNAP is a TS-873 running 4.4.1.146 (Build 20191206) Firmware.
I've had a ticket open with QNAP since 22nd of January and was sick of the lack of reply so I took matters into my own hands.
Hope this helps someone!
MB
-
- Know my way around
- Posts: 129
- Joined: Mon Oct 22, 2018 2:56 pm
Re: Fix for Qsirch and Spotlight
So what would the _spotlight user login be?
-
- Getting the hang of things
- Posts: 50
- Joined: Sat Jan 05, 2019 5:27 pm
Re: Fix for Qsirch and Spotlight
Dear mousebat,mousebat wrote: ↑Wed Feb 12, 2020 11:04 pm ... I added a user "_spotlight" and set a very secure password for them. I then gave this user read only access to the Shared Folders and then propagated these using the "Apply and replace all existing permissions of this folder, files and subfolders" in the "Edit Share Folder Permissions" dialog box from the "Privilege" control panel.
thanks so much for posting this - I didnt see your post until today, annoyingly I was discussing this same issue on another thread in this forum!
viewtopic.php?f=30&t=143984&start=30
Adding the _spotlight user on the QNAP, giving it read-only access to the shares is easy to do. I set a password for the user, but am not sure whether you need to give that user/password to the Mac connecting to it - do you? I am confused that it works without the Mac being given access...
Connecting to the QNAP share via AFP does now allow search to work. Its not as fast as a Spotlight search on my internal drive, but file name and EXIF data from photo files are both discoverable! Its certainly fast enough for finding the right folder by name or set of files etc.
THANKYOU!!
-
- Starting out
- Posts: 39
- Joined: Wed Feb 12, 2020 10:39 pm
Re: Fix for Qsirch and Spotlight
No worries, I’m not 100% sure this is a reliable fix so I’ve written a MacOS app that interfaces with the QSirch rest api. It’s lightning fast and has the ability to fetch quick look previews. I’m still picking the bugs out of it and polishing it but should be ready soon.
At the moment it does require your QNAP to have a valid SSL certificate and as such a proper FQDN as it does it’s requests with HTTPS for security. I was thinking of submitting it to the Apple App Store so using SSL is definitely required for that.
I’ll post screenshots tomorrow for anyone who is interested
At the moment it does require your QNAP to have a valid SSL certificate and as such a proper FQDN as it does it’s requests with HTTPS for security. I was thinking of submitting it to the Apple App Store so using SSL is definitely required for that.
I’ll post screenshots tomorrow for anyone who is interested
-
- New here
- Posts: 5
- Joined: Tue Oct 08, 2019 5:25 am
Re: Fix for Qsirch and Spotlight
Yes, very interested.
-
- Starting out
- Posts: 29
- Joined: Sat Nov 11, 2017 9:38 pm
-
- First post
- Posts: 1
- Joined: Sun Oct 04, 2020 5:59 pm
Re: Fix for Qsirch and Spotlight
I'm also following this. Having nightmares over Spotlight not working.
-
- Starting out
- Posts: 39
- Joined: Wed Feb 12, 2020 10:39 pm
Re: Fix for Qsirch and Spotlight
Hi All,
Sorry for the delay - I’ll post screenshots and download link ASAP. App is built but is a little unrefined. I can’t submit it to the App Store because I’ve not strictly followed Apple’s Human Interface guidelines.
Ironically the app looks and works just like the Spotlight dialog initiated from the menu bar (runs as a daemon with no Dock icon etc...).
It does require your QNAP box to have a valid SSL certificate as Apple frowns on contacting API’s without one. This can be done with LetsEncrypt, I’m sure there are guides on this forum somewhere.
I’d like to point out that I’m not a software developer, there will be bugs but I’ll do my best to squash them if you report them. As such it’s free until I hammer it into a commercial form, I’ve spent a couple of months on my evenings and weekends making this so would be great to see some reward for my efforts but I’ll probably wait until Big Sur is released before messing around any more.
Watch this space
Sorry for the delay - I’ll post screenshots and download link ASAP. App is built but is a little unrefined. I can’t submit it to the App Store because I’ve not strictly followed Apple’s Human Interface guidelines.
Ironically the app looks and works just like the Spotlight dialog initiated from the menu bar (runs as a daemon with no Dock icon etc...).
It does require your QNAP box to have a valid SSL certificate as Apple frowns on contacting API’s without one. This can be done with LetsEncrypt, I’m sure there are guides on this forum somewhere.
I’d like to point out that I’m not a software developer, there will be bugs but I’ll do my best to squash them if you report them. As such it’s free until I hammer it into a commercial form, I’ve spent a couple of months on my evenings and weekends making this so would be great to see some reward for my efforts but I’ll probably wait until Big Sur is released before messing around any more.
Watch this space
-
- Starting out
- Posts: 29
- Joined: Sat Nov 11, 2017 9:38 pm
Re: Fix for Qsirch and Spotlight
Awesome!
Happy to test it prior to submission to App Store. I bought a certificate from QNAP and have also several docker containers with Let's encrypt certificates provided by traefik. Happy to share links to guides etc.
Of course, happy to do the reporting. May I suggest github? Could be more efficient than email.
I'd be very much ok with paying for it. Have also spent money on others e.g. HoudahSpot etc.mousebat wrote: ↑Sun Oct 04, 2020 9:19 pm As such it’s free until I hammer it into a commercial form, I’ve spent a couple of months on my evenings and weekends making this so would be great to see some reward for my efforts but I’ll probably wait until Big Sur is released before messing around any more.
Will do!
-
- Starting out
- Posts: 39
- Joined: Wed Feb 12, 2020 10:39 pm
Re: Fix for Qsirch and Spotlight
Ok here are the screenshots!
Main Search Bar
Search Results
Search Detail View
Server Details
I've blurred the files and paths as it is from a live file system. I'll be releasing the app shortly for free download, hopefully on GitHub so bugs can be tracked etc...
I've just got to work out how to safely release it and protect my code for the eventuality that I may commercialise it. The app is locked into working on Catalina for the time being I may open that up for older Mac OS if demand is high enough.
Main Search Bar
Search Results
Search Detail View
Server Details
I've blurred the files and paths as it is from a live file system. I'll be releasing the app shortly for free download, hopefully on GitHub so bugs can be tracked etc...
I've just got to work out how to safely release it and protect my code for the eventuality that I may commercialise it. The app is locked into working on Catalina for the time being I may open that up for older Mac OS if demand is high enough.
-
- Starting out
- Posts: 26
- Joined: Thu Mar 29, 2012 6:19 pm
Re: Fix for Qsirch and Spotlight
Very interresting
-
- Starting out
- Posts: 39
- Joined: Wed Feb 12, 2020 10:39 pm
Re: Fix for Qsirch and Spotlight
Here we go:
https://github.com/mousebat/QsirchMac
I've not really done much of a documentation as it's fairly intuitive to use. Just remember you have to double click the preview panel to reveal the file in Finder, double clicking the file in just the search results list doesn't work as SwiftUI framework has no allowance for double clicking in Navigation Lists, I can hack it but it's a bit buggy and does not work as it should.
The search will only return files at the moment and not directories. There is a possibility to include directories in the Qsirch API but I've got to come up with a solution for gracefully handling that on the SwiftUI side.
The app runs as a daemon with no dock icon and menu, just a menubar button to show and hide. It should traverse different spaces (Desktops) ok enough. On clicking away from the app it automatically hides - just like spotlight does. I wasn't sure if I liked that functionality so if it annoys enough people I'll write a switch in the preferences pane to disable it.
If you want to quit the app at any time just use "command and q" like you would any other app.
Hope you all like it!
mb
https://github.com/mousebat/QsirchMac
I've not really done much of a documentation as it's fairly intuitive to use. Just remember you have to double click the preview panel to reveal the file in Finder, double clicking the file in just the search results list doesn't work as SwiftUI framework has no allowance for double clicking in Navigation Lists, I can hack it but it's a bit buggy and does not work as it should.
The search will only return files at the moment and not directories. There is a possibility to include directories in the Qsirch API but I've got to come up with a solution for gracefully handling that on the SwiftUI side.
The app runs as a daemon with no dock icon and menu, just a menubar button to show and hide. It should traverse different spaces (Desktops) ok enough. On clicking away from the app it automatically hides - just like spotlight does. I wasn't sure if I liked that functionality so if it annoys enough people I'll write a switch in the preferences pane to disable it.
If you want to quit the app at any time just use "command and q" like you would any other app.
Hope you all like it!
mb
-
- Starting out
- Posts: 29
- Joined: Sat Nov 11, 2017 9:38 pm
Re: Fix for Qsirch and Spotlight
Awesome! Works over here as well and really fast! I'll move to github for bug reports.
-
- Starting out
- Posts: 15
- Joined: Thu Feb 10, 2011 10:44 am
Re: Fix for Qsirch and Spotlight
May I put in a vote for a Mojave version? Most of the machines connecting to our QNAP are still on Mojave.
-
- Starting out
- Posts: 29
- Joined: Sat Nov 11, 2017 9:38 pm
Re: Fix for Qsirch and Spotlight
Please let me raise everyone's awareness that Spotlight support was recently added to samba. There are instructions available how to set it up. Not great to run this in addition to what QNAP provides (another samba server, another full-text index to build and to feed RAM to..), but perhaps a solution for a few forum members.