Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Spotlight/Smart Folders only indexing files when I open them?

Spotlight/Smart Folders only indexing files when I open them?
Thread Tools
nath
Mac Elite
Join Date: Oct 2003
Location: London
Status: Offline
Reply With Quote
May 5, 2005, 05:09 PM
 
Not sure if I'm misunderstanding the way Spotlight is meant to work, would appreciate it if anyone could explain what is going on here...

It seems that Spotlight will only pick up filenames after I have opened the files. For example, I have hundreds of PDFs (book covers I've designed) on my PB's internal hard drive. Yet if I search for '.pdf' in Spotlight (all my files do have '.pdf' as part of the filename), I only get about 5 results, all PDFs I have worked on or created since installing Tiger. If I then open one of the PDFs that hasn't appeared in the search results, it will (from that point on) be added to the list of results. Exactly the same symptom with Finder Smart Folders.

A similar problem with IMAP mail. I have a .Mac account plus a couple of other business-related IMAP accounts. Smart Folders in Mail 2.0 will not pick up messages I have sent or received unless I actually open them.

Very frustrating, and not what I expected with teh Tiger searchy goodness. I have tried re-indexing the hard drive (by removing then re-adding it in the Spotlight prefs pane), but this results in exactly the same search results.

Anyone got any ideas?
     
TETENAL
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
May 5, 2005, 05:16 PM
 
No, Spotlight should have once (after you installed Tiger the first time) index everything. After it is done with indexing everything, it will automatically index every changed or new file. So the Spotlight index is always guaranteed to be complete.

Instead of searching for .pdf you could instead search for kind:pdf That way Spotlight would also display old OS 9 PDF documents that did not yet have a .pdf extension (but the respective HFS file type code).
     
nath  (op)
Mac Elite
Join Date: Oct 2003
Location: London
Status: Offline
Reply With Quote
May 5, 2005, 05:22 PM
 
Originally Posted by TETENAL
No, Spotlight should have once (after you installed Tiger the first time) index everything. After it is done with indexing everything, it will automatically index every changed or new file. So the Spotlight index is always guaranteed to be complete.

Instead of searching for .pdf you could instead search for kinddf That way Spotlight would also display old OS 9 PDF documents that did not yet have a .pdf extension (but the respective HFS file type code).
Thanks, but still the same result. I'm getting 7 of my PDFs in the results, although I know there are hundreds along similar file paths.

All of my PDFs were created using Acrobat 6 Pro under Panther.
     
TETENAL
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
May 5, 2005, 05:35 PM
 
First check in System Preferences->Spotlight whether you did not maybe exclude a folder from Spotlight.

If there is no exclusion, type the following into Terminal

mdls <drag a PDF into Terminal here that is not found>

and press return. In <drag here part> drag a PDF document into Terman that is not found by Spotlight. This will list all the metadata that Spotlight knows about the file. This will prove that Spotlight works correctly or not.

As a last resort you can force Spotlight to reindex your boot volume. To do so drag your boot volume (or the volume where nothing is found) into the Spotlight System Preferences Privacy list, so that the index is removed from the volume. Then remove it from the privacy list and a new fresh index is created.
     
nath  (op)
Mac Elite
Join Date: Oct 2003
Location: London
Status: Offline
Reply With Quote
May 5, 2005, 06:01 PM
 
Originally Posted by TETENAL
First check in System Preferences->Spotlight whether you did not maybe exclude a folder from Spotlight.

If there is no exclusion, type the following into Terminal

mdls <drag a PDF into Terminal here that is not found>

and press return. In <drag here part> drag a PDF document into Terman that is not found by Spotlight. This will list all the metadata that Spotlight knows about the file. This will prove that Spotlight works correctly or not.

As a last resort you can force Spotlight to reindex your boot volume. To do so drag your boot volume (or the volume where nothing is found) into the Spotlight System Preferences Privacy list, so that the index is removed from the volume. Then remove it from the privacy list and a new fresh index is created.
I've tried that reindex method, with no effect. This is what I get from the Terminal command:

kMDItemAttributeChangeDate = 2583-10-17 13:44:55 +0000
kMDItemFSContentChangeDate = 2005-04-15 15:10:32 +0100
kMDItemFSCreationDate = 2005-04-15 15:10:14 +0100
kMDItemFSCreatorCode = 1128354383
kMDItemFSFinderFlags = 0
kMDItemFSInvisible = 0
kMDItemFSLabel = 0
kMDItemFSName = "ABC_Asthma.pdf"
kMDItemFSNodeCount = 0
kMDItemFSOwnerGroupID = 0
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 59331910
kMDItemFSTypeCode = 1346651680
kMDItemID = 1994752
kMDItemLastUsedDate = 2005-04-15 14:10:32 +0100
kMDItemUsedDates = (2005-04-15 14:10:32 +0100)

Care to translate? (I'm not much use at the Dark Arts)
     
TETENAL
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
May 5, 2005, 06:07 PM
 
If I do that on a PDF document I get (amongst other things of course)

kMDItemContentType = "com.adobe.pdf"
kMDItemKind = "PDF-Dokument"

so it looks something is not right for you.

Can this be a permissions problem maybe? You have owner group = 0. Is that correct?

Other than that I have no idea why it is not working for you.
     
cc_foo
Dedicated MacNNer
Join Date: Oct 1999
Location: with pretty wife
Status: Offline
Reply With Quote
May 5, 2005, 08:34 PM
 
This happened to me as well. On my PowerBook, the internal drive was well indexed. However on an external Firewire hard disk the finding was as described by the original poster. Yes, the indexing process had completed by then.

Personally I don�t think it's the settings via System Preferences that are at fault--likely something intrinsic to Spotlight.

I solved it via deleting the index file, and using the command line to �command� Spotlight to rebuild the index. I got this information from MacOSXHints, and won�t duplicate them here.

Someone recommended that I copy the files off the hard disk, and then back again, which I think would also have worked. Maybe you could duplicate a folder containing your files, and then delete the duplicate. Followed by a reboot maybe. A hassle yes. Just a suggestion.
     
nath  (op)
Mac Elite
Join Date: Oct 2003
Location: London
Status: Offline
Reply With Quote
May 6, 2005, 03:49 PM
 
Originally Posted by cc_foo
This happened to me as well. On my PowerBook, the internal drive was well indexed. However on an external Firewire hard disk the finding was as described by the original poster. Yes, the indexing process had completed by then.

Personally I don�t think it's the settings via System Preferences that are at fault--likely something intrinsic to Spotlight.

I solved it via deleting the index file, and using the command line to �command� Spotlight to rebuild the index. I got this information from MacOSXHints, and won�t duplicate them here.

Someone recommended that I copy the files off the hard disk, and then back again, which I think would also have worked. Maybe you could duplicate a folder containing your files, and then delete the duplicate. Followed by a reboot maybe. A hassle yes. Just a suggestion.
I've actually gone as far as to reinstall Tiger now (archive and install) and STILL THE SAME THING!!


This is really getting me down, everything is peachy on my desktop but the PB just refuses to give me the Spotlight goodness.
     
Mr Scruff
Mac Enthusiast
Join Date: Feb 2001
Location: London, UK
Status: Offline
Reply With Quote
May 6, 2005, 04:04 PM
 
In the terminal, type:

ls -l

and drag a pdf the above mentioned pdf into window and press return. What is displayed?
     
nath  (op)
Mac Elite
Join Date: Oct 2003
Location: London
Status: Offline
Reply With Quote
May 6, 2005, 04:43 PM
 
Originally Posted by Mr Scruff
In the terminal, type:

ls -l

and drag a pdf the above mentioned pdf into window and press return. What is displayed?


-rw-r--r-- 1 nathanla nathanla 2322127 Feb 18 11:38 /Users/nathanlaptop/Documents/Work/iBooks/Blackwells/Jabbour/Jabbour.pdf
     
Mr Scruff
Mac Enthusiast
Join Date: Feb 2001
Location: London, UK
Status: Offline
Reply With Quote
May 7, 2005, 10:51 AM
 
Looking at the man page for mdimport, you could try the following in a terminal

sudo mdimport -r /System/Library/Spotlight/PDF.mdimporter

That would ask Spotlight to reindex all of the PDF files on your computer.

Note that doing an archive install probably wouldn't force a rebuild of the spotlight index, since the index file wouldn't be erased.
     
nath  (op)
Mac Elite
Join Date: Oct 2003
Location: London
Status: Offline
Reply With Quote
May 7, 2005, 11:01 AM
 
Originally Posted by Mr Scruff
Looking at the man page for mdimport, you could try the following in a terminal

sudo mdimport -r /System/Library/Spotlight/PDF.mdimporter

That would ask Spotlight to reindex all of the PDF files on your computer.

Note that doing an archive install probably wouldn't force a rebuild of the spotlight index, since the index file wouldn't be erased.

Thanks for all your help - and the same to Tetenal too.

After banging my head against the wall for a couple of days I realised that it was just one folder (and many folders included within) that weren't being indexed.

Burnt it to a CD, deleted the original from the hard drive, then copied it back again from the CD and presto - mucho searchy goodness!
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 02:55 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,