Hacker News new | ask | show | jobs
by cmcd 2315 days ago
Why does MacOS only "sort of" have type-to-search?
2 comments

It seems like an inaccurate statement, I would argue OSX was the first one to do type-to-search properly... Not a huge Ubuntu user admittedly.
AFAIK, it only searches through your apps, not files.
Spotlight is the OG OS integrated full text search, originating 2004/5:

https://en.wikipedia.org/wiki/Spotlight_(software)

Spotlight has not been useful to me in over half a decade. It never finds the files I need, despite the fact that I know they're there, I know I typed them right, and I know its settings hasn't hidden or ignored them. And instead it almost always shows useless files in completely obscure parts of the OS that shouldn't even show up in Spotlight. I turned it off like a year ago and haven't regretted it since.
Maybe your md index is borked. Look into the mdutil (maintenance) and mdfind (search) commands.
Interesting- I find it very useful. It even searches my email that is locally cached. Lots of apps create hooks into it. Major part of the ecosystem that makes MacOS what it is.

Not sure why it's borked for you...

Spotlight on macOS most definitely searches files, much of the system is in fact built on file system metadata attributes. (It was original designed by Dominic Giampaolo, who also architected BeOS's file system.)
Recently I discovered that Xcode uses Spotlight in an interesting way — when you want to convert crash logs from your apps into readable stack traces, you only need to place the relevant symbol files anywhere on the disk where Spotlight can find them. No need to import them directly into the IDE.
Not just FS metadata, it can index ID3 tags, EXIF, and whatnot, and it’s fairly extensible, although underused.

Kind of like the underpinning concept of AppleScript and app dictionaries, awesome tech and concepts, but it’s sad to see the promise of the extensible, composable desktop slowly dying.

> It was original designed by Dominic Giampaolo

This is the first that I'm hearing of this. That is absolutely sick.

I just tried searching for a file with Spotlight and it found the file by name.