Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rate Thread Display Modes
Old 04-11-2012, 11:57 PM   #1
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
Spotlight won't search for folders if pdf search also selected.

I've got a strange problem with Spotlight. If i include pdfs in the search, spotlight will not at same time search for folders.

Deselect pdfs and it finds folders again.

I reindexed Spotlight a number of times but not change.

I'm running 10.7.3 on a MacBook.
steveadd is offline   Reply With Quote
Old 04-14-2012, 05:41 PM   #2
ganbustein
MVP
 
Join Date: Apr 2008
Location: Berkeley CA USA
Posts: 1,156
It's not clear how you're "including pdfs", but usually each thing you add to the search narrows the search down. If you say "Kind is PDF", then anything that is not a PDF (for example, a folder) will not be found.

When adding a search condition, you can hold down the option key while clicking on the (+) button, and you will get a condition that lets you choose between "Any"/"All" of the following are true.

Using that, you could set up a search for:

"Any" of the following are true
... "Kind" is "PDF"
... "Kind" is "Folder"

and get results of both kinds. Unless you add of "Any" clause, the assumption is that you want to match on "All".
ganbustein is offline   Reply With Quote
Old 04-14-2012, 06:26 PM   #3
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,784
In the Spotlight menu (the magnifying glass icon at the top right of the screen), you can specify a search term and indicate if it should be found in folders or PDFs. It would look like this:

searchterm kind:pdf OR kind:folder

That would find folders with searchterm in the name and PDFs with searchterm in the name or within the PDF files (assuming the text within the PDFs is searchable)
NaOH is online now   Reply With Quote
Old 04-15-2012, 01:30 AM   #4
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
Spotlight search

I'm in System Preferences for Spotlight and it allows searches of multiple types of files, applications and folders at the same time.

For some reason it won't search for folders unless I deselect pdfs.

Are we talking about the same problem?
steveadd is offline   Reply With Quote
Old 04-16-2012, 10:59 AM   #5
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,784
Please describe in extensive detail how you are performing a search and the results you are seeing.
NaOH is online now   Reply With Quote
Old 04-18-2012, 11:57 PM   #6
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
Spotlight search

Quote:
Originally Posted by NaOH
Please describe in extensive detail how you are performing a search and the results you are seeing.

I open the Spotlight panel at the top right corner of the screen (magnifying glass) and type in what I'm searching for.

In the Spotlight Preferences in System Preferences I have folders, pdfs, docs, applications and a few others selected under Search Results.

This works just fine on my iMac. On my macbook Pro it won't find folders unless I deselect pdfs. Sometimes it doesn't find other formats.

I've rebuilt or reindexed Spotlight a number of times.

Steve
steveadd is offline   Reply With Quote
Old 04-19-2012, 12:00 AM   #7
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,784
Okay, so what happens if you use that Spotlight menu to enter this (note the lack of spaces):

Code:
kind:folder
Does it show any results?
NaOH is online now   Reply With Quote
Old 04-19-2012, 12:23 AM   #8
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
yes if I search for:

kind:folder

It finds folders.

If I search any other phrase it won't find any folders if pdfs are chosen for search results.
steveadd is offline   Reply With Quote
Old 04-19-2012, 12:31 AM   #9
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,784
If you go to System Preferences > Spotlight > Search Results, have you tried moving Folders higher up in the list? This is kind of a non-obvious way that you can adjust the order of the search results you are shown. I'm wondering if you move folders up high in the list and then do a test search if that makes any difference.
NaOH is online now   Reply With Quote
Old 04-19-2012, 12:36 AM   #10
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
Even if folders is #1, if I have documents or pdfs selected it won't find any folders. Also if I have just pdfs and docs selected it won't find any docs.

Seems to be maxing out on too many finds. It will then just show pdfs over docs or folders.
steveadd is offline   Reply With Quote
Old 04-19-2012, 12:41 AM   #11
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,784
How did you attempt to rebuild the Spotlight index?
NaOH is online now   Reply With Quote
Old 04-19-2012, 12:43 AM   #12
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
yes, just did it again half an hr ago. Have rebuilt a number of times.
steveadd is offline   Reply With Quote
Old 04-19-2012, 12:47 AM   #13
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,784
I didn't ask if you've rebuilt the Spotlight index, I asked how you did that.
NaOH is online now   Reply With Quote
Old 04-19-2012, 12:49 AM   #14
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
ok.

Most recently by putting the hard drive in the privacy category and then taking it out again.

Also used ONYX one time.

Steve
steveadd is offline   Reply With Quote
Old 04-19-2012, 01:00 AM   #15
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,784
Try this method. Copy the text below and open Terminal (in /Application/Utilities). Paste the code into the Terminal window at the prompt.

Code:
sudo mdutil -E /

You will be asked for your administrator password (and if you've never used the sudo command you'll need to accept the warning presented). When you type your password, it will look like nothing is being typed. That's normal. Once you've typed your administrator password, press Return.

This will completely remove the Spotlight index and force a new one to be created. Probably not necessary, but I would immediately quit Terminal and restart your Mac.

The re-creation of a Spotlight index takes some time while Spotlight indexes your stuff. I've got about 40 GB on my startup volume and it usually takes 15-20 minutes. You can tell if it's still in progress by simply looking at the Spotlight menu: There's a blinking dot in the middle of the magnifying glass while indexing is occurring. Just wait. Let it complete the indexing, then test, and report back.
NaOH is online now   Reply With Quote
Old 04-19-2012, 01:08 AM   #16
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
thanks will do
steveadd is offline   Reply With Quote
Old 04-19-2012, 10:28 PM   #17
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
NaOH, apologies for the delay. Done everything you suggested re indexing of Spotlight, restarted, but with no change to the problem.
steveadd is offline   Reply With Quote
Old 04-19-2012, 10:31 PM   #18
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,784
Hmm. The next step, simply a diagnostic one, would be to create a new user account and see if the issue exists there. That will tell us if the problem is confined to your usual user account or if it's a system-wide problem.
NaOH is online now   Reply With Quote
Old 04-19-2012, 10:39 PM   #19
steveadd
Prospect
 
Join Date: Apr 2012
Posts: 26
I already had a second user for public use. The spotlight search works fine for folders.
steveadd is offline   Reply With Quote
Old 04-19-2012, 10:54 PM   #20
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,784
First, do you have any third-party Spotlight plugins installed? These would be in ~/Library/Spotlight. If so, move these to the Desktop, run the earlier Terminal command (just in case), and restart your Mac.

If you don't have any third-party plugins, or if you do and the above makes no difference, there are a few Spotlight preferences files to try replacing. Sometimes, for no apparent reason, preferences files can become corrupt. I can't honestly say which preferences file does what, but I would suggest moving all of them to the Desktop, running the same Terminal command we discussed earlier (again, just in case), then immediately restarting. I'm running Lion (10.7), so you may see some slightly different names or files if you're using something else.

~/Library/Preferences/com.apple.spotlight.plist
~/Library/Preferences/com.apple.spotlight.plist.lockfile

These next two, by default, are not visible. Assuming you still have Onyx on your Mac, you can make them visible with that application. Go to the Parameters > Finder section, then enable the checkbox next to Show Hidden Files And Folders.

~/Library/Preferences/.byhost.spotlight.mdquery
~/Library/Preferences/.byhost.spotlight.XXXXXXXXXX.spo

Also check ~/Library/Caches, for anything that includes com.apple.spotlight in its name.

After you restart, you can revert the setting for hidden files with Onyx. Likewise, you should go to System Preferences > Spotlight to confirm all the settings are as you like since they were probably reset.
NaOH is online now   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 05:17 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.