Search Samba file server from Windows?

I’m using a CentOS 7 box as a file server running Samba. I have some PCs running Windows 7 that access the Samba share on the CentOS box. This is all working fine, except I’d like to offer the ability to have the Windows 7 users to be able to search their share on the file server.

On Windows at the Start Menu, they can do a search but this is limited it appears to cached links to files. So if you are doing a new search for file foobaz and you never accessed it before from this PC, it doesn’t find it.

I’ve considered writing a web based search that would allow searching of the Samba share to LAN users only. But listing the file paths isn’t enough, I’d like it to be able to open the folder for the file they are interested in the Windows Explorer.

In summary: The need is for Windows PC users to be able to search their entire share for a file by name, and easily access it to use whatever application on their PC to access the file.

So you want the share to be indexed? The share can still be searched from within Explorer; it will just take a while. For an indexed solution you might care to look here.

That’s a good question.

What is involved with it being indexed and how is the performance of it? How often does the index get updated? Does anything need to be installed on the Linux server running Samba to support the indexing such as a process that indexes the files?

With the Linux ‘find’ command, it takes less about a 1/4 of a second to return a search of 60,00 files. Of course, this is from the web browser and I don’t see an easy way for it to open the Folder for the file in Windows Explorer for the PC user.

I read in that link, a comment about using “Windows Search Service”, but that appears to be a feature on Window servers. I looked around and can’t find evidence that “Windows Search Service” is supported in a Linux/Samba platform.

That link says that to get your non-Windows share indexed, you make a link on your local PC using the MKLINK command and put the resultant folder in a library. Note that each and every PC will separately index the share with the index stored locally, which might mean high network traffic for a while.

Have you tried using a search utility for windows like Agent Ransack? I used it quite often on SMB file shares and find it performs well.

Thanks, this looks interesting. When it finds the file, can the user then have it open the Folder in Windows Explorer or it opens the file in the appropriate application? For example, a Microsoft Word file would open in Word, a PDF would open in Adobe Acrobat Reader, that sort of thing?

Yes, the search results in Agent Ransack behave almost identically to a file list in windows explorer. You can double-click the file to open it in the default application, right-click it to bring up a context menu, or drag-and-drop it into another location to copy it there.

And it adds a few special options of its own to the right-click context menu, one of which is “open this file’s folder in Windows Explorer.”