Well, actually, I was mistaken in saying that. What you’re seeing is country-specific. Spotlight since Yosemite returns results that may be different depending on your location.
I live in Thailand. I don’t get those results (thankfully) because some of the services they rely on are not available outside of the US and few other select countries.
When your search engine decides for you what you can see based on your location or, indeed, any other criterion that you don’t specifically control yourself, that’s my definition of a ‘crippled’ search engine.
Spotlight is Spotlight, so one needs to to make the distinction.
Some people think the Finder search is separate from Spotlight, but as you know that isn’t the case.
You and I are in agreement about the various stupidities of Spotlight, so we need not go into that much further.
It used to be possible to use the keyword filename:<string> and have the basic Spotlight UI find system files, but Apple in their infinite wisdom broke that in Yosemite (IIRC).
Again, every tool has its benefits and limitations.
The key to working any job effectively is to identify the proper tool to use.
If you only want a file search, and for it to include all files, then use your SuperSearch tool.
If you want to search for a broader set of items, and have the tool use some intelligence about filtering out less useful results, then use a tool like Spotlight, and maybe better HoudaSpot.
I’m not sure why there is such a rant against Spotlight. No is is forcing you to use it.
AppleScript has many limitations and quirks. I could go on ad nauseam complaining about these, but for no benefit. We have learned how to workaround these by using enhancements like scripting additions and script libraries, and of course, ASObjC.
So I’ll continue to use Spotlight (or maybe HoudaSpot) because it works well for me for many of the tasks I use it for. For a more file-focused search, I use Finder search (which is based on Spotlight), but with lots of help in selecting filters.
Good point. I didn’t get that you were connecting the filename: syntax with system files. I don’t know if filename: qualifier still works the same, just that now name: will filter for file names.
Spotlight couldn’t find the csrutil file, but Finder could, provided you searched from the /usr folder.
So, knowing that, if I needed to search for files like csrutil, I could just add the /usr or /usr/bin folder to my Finder Favorites.
OR
As you stated in the other thread:
If I was going to often search for system files, I’d probably create a Finder Saved Search for it.
The point of the csrutil example was not to say “you can’t find it if you jump through a few hoops”, but that Spotlight (ie., the system wide UI tool in the menu bar, not the advanced Spotlight filter bar in Finder) won’t find it. Period.
If I use find in Terminal, I can find csrutil. If I use locate in Terminal, I can find csrutil; if I use mdfind in Terminal I can find csrutil; if I use Spotlight, I can’t.
Edit: about my use of the term ‘crippled’: it was a deliberate choice to reflect the fact, as noted above, that mdfind (and NSMetadataQuery) both can find things like csrutil, which means that the file is indexed by mds, the engine behind Spotlight, but that Apple have coded Spotlight deliberately not to return System and certain other files (that by the way, isn’t an inference; I was told so by an Apple engineer).
Sorry, I completely disagree. A tool that has a specific design criteria and/or goal is not crippled just because you disagree with the design.
I could call your “SuperSearch” crippled because it does not show any other document types like Evernote, Outlook, Wikipedia, etc. But I don’t. It simply has a different design objective.
I notice that you have ignored all of my statements about picking the proper tool for the job. You seem to want to keep complaining that a sledge hammer can’t extract screws. LOL
Just in case you haven’t figured it out yet, Spotlight is NOT designed to find every file on your hard drive. Use other tools for that job.
Jim, we got into this because I said “it’s quick but not very powerful” and you disagreed. I’ve ignored all your examples because a powerful search tool should find things on my mac. Spotlight doesn’t search my whole mac, and it doesn’t return all the files that exist in places it does search.
But we’re going round in circles and probably just annoying the hosts. I think we’ve both made our point. Let’s leave it here.
I’ve been in some kind of programming for almost 40 years and if there is one thing I have learned the best tool for the job is very much affected by personal preference. And that changes from person to person. Spotlight is good enough for a very, very large section of people who are looking for data on their Mac. It has been a very long time since spotlight couldn’t find what I was looking for. Of course if I have something I want to find later I put it where spotlight can find it. There are lots of way to get something indexed that normally wouldn’t get indexed. But I do this because of my personal preferences. If your preference to put data where you want to put it and you need a search that finds it there then that is your preference. It is not right or wrong. It’s just a preference.
I am really big on searching data so I make concessions to make data easier to find and as a result I am almost always able to find what I am looking for. This is why I have worked with databases since right out of high school. It is a really big thing to me. This is a personal preference of mine. Jim has preferences that are different then both of ours. What this all comes down to is you can’t convince Jim your right because you’re looking for different things then Jim is. One way satisfies your needs better and another satisfies Jim’s needs better. You both are right about your preferences so you are bother right.
I made a joke about spot light to lighten the mood a while back and it just seemed to annoy you so I haven’t said anything since. Both you and Jim have great ideas about searching. If you both shared your ideas and agree on strengthens and weakness in both methods people could learn a lot about searching from both of you.
It is something to think about. You are both right for a given individual. That’s all there is to it.
Seriously, guys, this is a great topic (Mac Search Tools) and deserves to be explored with substance and examples. This pissing contest is counter productive.
I’ve been looking at this topic every day for good information about how to craft an applescript method to do specific searches but this is all I get.
Spotlight is far, far more than a file search tool. And, we know that it will not find some system files. But it really makes searching for a broad range of things easy, right at your fingertips. I went for years ignoring Spotlight, then using it to launch apps, and finally to trying to take full advantage of what it offers.
Being the author of one (rather successful) search tool for the Mac, I am a tiny bit miffed no one mentioned it. But instead of whining let me just make this shameless plug
Find Any File is based on the original Mac OS’s “Find File” tool, looking for all kinds of file properties (name, size, dates) but not content (that’s in the works, but it won’t be as good as Spotlight’s, but rather like EasyFind’s or the “grep” command’s). It can search entire disks rather fast because it uses the little known “CatalogSearch” function available only on HFS(+) and AFP volumes.
And my app can even search with root permissions (no other tool does that), like a “sudo find” command, allowing you to find even files that are normally inaccessible to you.
Of course, it’s no replacement for Spotlight, but it does some things better, especially if you look for files by name in areas where Spotlight never looks (e.g. in the areas marked Private in Spotlight’s Preferences).
The only thing it can’t yet do is being scriptable. I am considering adding that, now that I wrote my own scriptability framework last year (with great help from the kind Latenightsw devs).
Thomas, thanks for sharing your tool with us. I was aware of it, but had forgot about it. Sounds like Find Any File is a great tool to start with if you want to search on name (or other property).
I think that’s a great idea, and would be useful to many.