5

I'm having problems with the search in Finder windows in MacOS X 10.6.8.

If I'm typing a search keyword in the textbox in a finder window and search for "file name" or "content", I get no or only a few results, although there should be much more results.

Is this a bug in OS X?

e.g. if I activate the search for "file name" and type "a" in the text box, I get 8 results. When I search for "b" instead, I get 61 results, and 60 of them have an "a" in the file name!

Is this a known bug?
Is there a solution?


Edit: I've tried to

  • rebuild the spotlight index with sudo mdutil -E _PathOfPartition_
  • repaired permissions on the startup drive

... but no change - Finder/Spotlight does not list files as results, although they exist and match the search criteria.

3
  • This has always happened to me also. Sadly the only resolution I was able to come to was: Spotlight is totally useless. :-(
    – Josh
    Nov 8, 2011 at 13:35
  • @Josh: did you see the solution, I finally found? (owner of files has to be me?) Sure, if you're working with different accounts of files owned by other people, spotlight seems to be really useless. Nov 8, 2011 at 14:37
  • Sadly, no. My solution was to not use Spotlight. A lot of my files are on AFP shares, that could be part of the problem. Or that I use FileVault. But whatever the reason, I have given up on Spotlight.
    – Josh
    Nov 8, 2011 at 15:13

2 Answers 2

2

On my system, typing successive letters always shrinks the results menu. Have you tried rebuilding your Spotlight index? Open terminal in an admin account and type:

sudo mdutil -i on "/Volumes/YourHardDiskNameHere"

, authenticate with your password, and go get a coffee.

Edit: Another way to accomplish this is to open Spotlight preferences to the privacy tab and drag your HDD icon from finder onto the "Prevent spotlight..." list. Close preferences (may not be necessary - ?). Open it again to the same tab and use the +/- buttons to delete the disk. Re-indexing should start.

14
  • thanks I'll try to rebuild the index later (when there is time for the "coffee"). However maybe my description was unclear: I first searched for "a" and then for "b" (not ab!), but the results for "b" also had an "a" in their name which clearly shows that there should have been more results for "a" Oct 22, 2011 at 14:05
  • 1
    A single letter search should indeed match "tons" of files, but Spotlight shows an abbreviated list. Click Show All to get the full list - mine just returned 7000 items for 'b'! Regardless, I'd rebuild the index and see whether its returns improve any. BTW, the coffee suggestion was partly facetious; you can still use your computer (but not Spotlight) while the index is being rebuilt, but Spotlight will compete with your application(s) for disk access.
    – JRobert
    Oct 22, 2011 at 14:13
  • I'm not talking about a spotlight search but about a search in a Finder window limited to the actual directory. Nevertheless my search should have had at least 60 results, but showed only 8. I'll try to rebuild the index now. Oct 22, 2011 at 15:45
  • Does the terminal command mdutil -i really rebuild the index? I launched it and instantly got /: Indexing enabled. I think it needs option **-EÜÜ instead. -> http://macstuff.beachdogs.org/blog/?p=38 Oct 22, 2011 at 16:18
  • it seems not to work - also with option -E the spotlight menu stays accessible and I get the "Indexing enabled" prompt instantly. Oct 22, 2011 at 16:28
2

After long research and tests I finally found the solution:

I'm using 2 partitions - one for the system files (and users directories) and one for my data.

Shortly I created a new user account for an apple service technician and wanted to remove the read permissions for my data partition.

I did this with BatCHMOD and it apparently I unintentionally made the new (temporary) user account the owner of all my files (with no read permission!). So I had read & write permissions for my files, however Spotlight was not able to find them.

  • I changed the owner of the whole partition (and its contents) back to my account and
  • removed the temporary user account after the repair
  • rebuilt the index with sudo mdutil -E /Volumes/*

and now finally Spotlight is able to filter and find all files
:)

remark: there are 2 facts which are still confusing for me:

  • spotlight seems to be unable to find files/folders, which I do not own?!
  • a one letter search term for file names does not work as I would have expected, as it does not list all files which contain the letter in their name! (have to dig deeper about this topic soon)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .