<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Mac OS X 10.5 Tip: Repairing broken Spotlight searches in Mail</title>
	<atom:link href="http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/</link>
	<description>Notes from an unfinished world…</description>
	<lastBuildDate>Mon, 06 Feb 2012 13:29:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: pothe</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-8299</link>
		<dc:creator>pothe</dc:creator>
		<pubDate>Wed, 18 Jun 2008 13:25:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-8299</guid>
		<description>Hi had the same issue about 2 months ago.
This fixed it for me:
http://discussions.apple.com/thread.jspa?threadID=1366101

see Sidha33 - near the bottom.

It worked a treat, all was well until today!  Over the weekend I had a sudden increase in GB. Somehow I lost around 35 GB on my 160 GB macbook pro.  I used Whatsize to show that spotlight v100 was 35 GB - so I then used MainMenu to rebuild the spotlight index.  Great news!  I got my 35 GB back...But

This morning I now have the same issue as before - spotlight has stop working. 

Despite repeating the above, and all the other methods I have come across, mds simply won&#039;t rebuild.  It stays active for a few minutes and then stops.  

I hope the above helps you guys - it did for me, at least for a while...back to the drawing board</description>
		<content:encoded><![CDATA[<p>Hi had the same issue about 2 months ago.<br />
This fixed it for me:<br />
<a href="http://discussions.apple.com/thread.jspa?threadID=1366101" rel="nofollow">http://discussions.apple.com/thread.jspa?threadID=1366101</a></p>
<p>see Sidha33 &#8211; near the bottom.</p>
<p>It worked a treat, all was well until today!  Over the weekend I had a sudden increase in GB. Somehow I lost around 35 GB on my 160 GB macbook pro.  I used Whatsize to show that spotlight v100 was 35 GB &#8211; so I then used MainMenu to rebuild the spotlight index.  Great news!  I got my 35 GB back&#8230;But</p>
<p>This morning I now have the same issue as before &#8211; spotlight has stop working. </p>
<p>Despite repeating the above, and all the other methods I have come across, mds simply won&#8217;t rebuild.  It stays active for a few minutes and then stops.  </p>
<p>I hope the above helps you guys &#8211; it did for me, at least for a while&#8230;back to the drawing board</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre Igot</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-8020</link>
		<dc:creator>Pierre Igot</dc:creator>
		<pubDate>Sat, 08 Mar 2008 03:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-8020</guid>
		<description>You&#039;re welcome :).

Unfortunately, as far as I can tell, it only restores the Spotlight functionality partially. Searches on specific mailboxes still don&#039;t work, and Spotlight fails to index messages added after the mdimport. So you have to redo it regularly.</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome :).</p>
<p>Unfortunately, as far as I can tell, it only restores the Spotlight functionality partially. Searches on specific mailboxes still don&#8217;t work, and Spotlight fails to index messages added after the mdimport. So you have to redo it regularly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jharkin</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-8018</link>
		<dc:creator>jharkin</dc:creator>
		<pubDate>Fri, 07 Mar 2008 23:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-8018</guid>
		<description>I&#039;ve been trying to fix this problem since I first installed 10.5.  I&#039;ve looked at various solutions for months to no avail.  Your suggestion with lsregister and mdimport worked!  Thank you!!!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been trying to fix this problem since I first installed 10.5.  I&#8217;ve looked at various solutions for months to no avail.  Your suggestion with lsregister and mdimport worked!  Thank you!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Ingraham</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-7985</link>
		<dc:creator>Paul Ingraham</dc:creator>
		<pubDate>Wed, 27 Feb 2008 14:56:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-7985</guid>
		<description>I&#039;ve encountered this bug many times, more times than I care to think about, more often than I change my socks.

I trust Spotlight searches in Mail so little that I virtually assume that it&#039;s going to go badly, and quickly and reflexively resort to other means of finding what I&#039;m looking for as soon as it&#039;s becoming clear that Spotlight isn&#039;t helping.  But then again my Mail.app has always be, er, &quot;special,&quot; what with completely non-functional junk mail filtering, and the way it displays about half of all my mail as being &quot;to&quot; a woman from my Address Book who is not at all me.  And so on.

Anyway, I have had some luck with semi-regularly re-indexing from scratch using the handy little Spotless utility.  Usually that helps.  A bit.  For a while.  Mail.app relaunches also often work, and it&#039;s a lot faster than re-indexing.  An interesting workaround is to do a spotlight search of your messages from the Finder: this often succeeds where Mail fails.

I also swear a lot at it, but I&#039;m not sure if that helps or just makes me feel better.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve encountered this bug many times, more times than I care to think about, more often than I change my socks.</p>
<p>I trust Spotlight searches in Mail so little that I virtually assume that it&#8217;s going to go badly, and quickly and reflexively resort to other means of finding what I&#8217;m looking for as soon as it&#8217;s becoming clear that Spotlight isn&#8217;t helping.  But then again my Mail.app has always be, er, &#8220;special,&#8221; what with completely non-functional junk mail filtering, and the way it displays about half of all my mail as being &#8220;to&#8221; a woman from my Address Book who is not at all me.  And so on.</p>
<p>Anyway, I have had some luck with semi-regularly re-indexing from scratch using the handy little Spotless utility.  Usually that helps.  A bit.  For a while.  Mail.app relaunches also often work, and it&#8217;s a lot faster than re-indexing.  An interesting workaround is to do a spotlight search of your messages from the Finder: this often succeeds where Mail fails.</p>
<p>I also swear a lot at it, but I&#8217;m not sure if that helps or just makes me feel better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ssp</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-7981</link>
		<dc:creator>ssp</dc:creator>
		<pubDate>Tue, 26 Feb 2008 22:22:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-7981</guid>
		<description>Crap! Good luck solving that problem then. Seems exactly the kind that Apple love to leave in their software for ages.</description>
		<content:encoded><![CDATA[<p>Crap! Good luck solving that problem then. Seems exactly the kind that Apple love to leave in their software for ages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre Igot</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-7977</link>
		<dc:creator>Pierre Igot</dc:creator>
		<pubDate>Tue, 26 Feb 2008 18:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-7977</guid>
		<description>Well, I discovered that my &quot;Spotlight&quot; folder in my main library still contained an importer for MailTags (even though I uninstalled that software long ago), so I trashed that and decided to force Spotlight to reindex from scratch. For good measure, I also trashed the Launch Services cache altogether first. I did all this with &lt;a href=&quot;http://www.maintain.se/cocktail&quot; rel=&quot;nofollow&quot;&gt;Cocktail&lt;/a&gt;.

After rebuilding the entire Spotlight index, I went back to Mail and, sure enough, Spotlight search was completely broken again, with searches on &quot;Entire Message&quot; not even working for &quot;All Mailboxes&quot; any longer. So I used the tip above to force Spotlight to reimport Mail&#039;s folder, and now searches on &quot;Entire Message&quot; are working for &quot;All Mailboxes&quot;, but still are not working when the focus is on a specific mailbox.

So this leads me to think that the MailTags importer had nothing to do with it, and that it is indeed a problem with Spotlight itself. Unfortunately, problems do persist across restarts. And I don&#039;t see any relevant messages in the system log.

By &quot;markedly different,&quot; I did indeed mean the content and localized stuff. Apart from that, there doesn&#039;t appear to be anything significant missing. So I don&#039;t think the problem is there. The problem is with Mail&#039;s ability to tap into the Spotlight index for its searches.</description>
		<content:encoded><![CDATA[<p>Well, I discovered that my &#8220;Spotlight&#8221; folder in my main library still contained an importer for MailTags (even though I uninstalled that software long ago), so I trashed that and decided to force Spotlight to reindex from scratch. For good measure, I also trashed the Launch Services cache altogether first. I did all this with <a href="http://www.maintain.se/cocktail" rel="nofollow">Cocktail</a>.</p>
<p>After rebuilding the entire Spotlight index, I went back to Mail and, sure enough, Spotlight search was completely broken again, with searches on &#8220;Entire Message&#8221; not even working for &#8220;All Mailboxes&#8221; any longer. So I used the tip above to force Spotlight to reimport Mail&#8217;s folder, and now searches on &#8220;Entire Message&#8221; are working for &#8220;All Mailboxes&#8221;, but still are not working when the focus is on a specific mailbox.</p>
<p>So this leads me to think that the MailTags importer had nothing to do with it, and that it is indeed a problem with Spotlight itself. Unfortunately, problems do persist across restarts. And I don&#8217;t see any relevant messages in the system log.</p>
<p>By &#8220;markedly different,&#8221; I did indeed mean the content and localized stuff. Apart from that, there doesn&#8217;t appear to be anything significant missing. So I don&#8217;t think the problem is there. The problem is with Mail&#8217;s ability to tap into the Spotlight index for its searches.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ssp</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-7971</link>
		<dc:creator>ssp</dc:creator>
		<pubDate>Tue, 26 Feb 2008 16:54:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-7971</guid>
		<description>If rebuilding the launch services database helped (which I sort out doubt) I would expect some of the data in there after the rebuild being different from the data before the rebuild. The dumped database for example lets you find out which application claims which UTIs and which spotlight importers can import them - which might be relevant for your situation. 

If mdfind does its job properly it suggests that your Mail is properly indexed (so probably no launch services related problems which keep the indexing from happening) and just the Mail application may be bad at running the Spotlight query. Personally I haven&#039;t seen that one yet. Does it persist across restarts? Are there any log messages when running the queries?

It&#039;s hard to tell what you mean by &#039;markedly different&#039;. If things are all right, the output will look quite different but the data inside it will be essentially the same (with mdls not containing the content and mdimport listing things like localised file type names). Things tend to be bad when  big chunks of information are missing. But it sounds like that isn&#039;t the case for you.

Luckily things are still working fine for me. But now I&#039;ll expect them to break any moment…</description>
		<content:encoded><![CDATA[<p>If rebuilding the launch services database helped (which I sort out doubt) I would expect some of the data in there after the rebuild being different from the data before the rebuild. The dumped database for example lets you find out which application claims which UTIs and which spotlight importers can import them &#8211; which might be relevant for your situation. </p>
<p>If mdfind does its job properly it suggests that your Mail is properly indexed (so probably no launch services related problems which keep the indexing from happening) and just the Mail application may be bad at running the Spotlight query. Personally I haven&#8217;t seen that one yet. Does it persist across restarts? Are there any log messages when running the queries?</p>
<p>It&#8217;s hard to tell what you mean by &#8216;markedly different&#8217;. If things are all right, the output will look quite different but the data inside it will be essentially the same (with mdls not containing the content and mdimport listing things like localised file type names). Things tend to be bad when  big chunks of information are missing. But it sounds like that isn&#8217;t the case for you.</p>
<p>Luckily things are still working fine for me. But now I&#8217;ll expect them to break any moment…</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre Igot</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-7970</link>
		<dc:creator>Pierre Igot</dc:creator>
		<pubDate>Tue, 26 Feb 2008 15:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-7970</guid>
		<description>ssp: What am I supposed to see when running lsregister -dump? I get a long list of various things, including information about the Mail application and about mail-related stuff. But I don&#039;t really know what I am looking for.

mdfind returns the expected results, since it&#039;s equivalent to a system-wide Spotlight search, which works just fine.

The output of the mdimport -d2 command on the message files is markedly different from the regular mdls output, but i don&#039;t know if that means anything. In any case, the search still fails after all this.

It looks to me like Spotlight is quite broken for Mail, really.</description>
		<content:encoded><![CDATA[<p>ssp: What am I supposed to see when running lsregister -dump? I get a long list of various things, including information about the Mail application and about mail-related stuff. But I don&#8217;t really know what I am looking for.</p>
<p>mdfind returns the expected results, since it&#8217;s equivalent to a system-wide Spotlight search, which works just fine.</p>
<p>The output of the mdimport -d2 command on the message files is markedly different from the regular mdls output, but i don&#8217;t know if that means anything. In any case, the search still fails after all this.</p>
<p>It looks to me like Spotlight is quite broken for Mail, really.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre Igot</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-7969</link>
		<dc:creator>Pierre Igot</dc:creator>
		<pubDate>Tue, 26 Feb 2008 14:27:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-7969</guid>
		<description>Yes, lots of things to try, and it&#039;s quite painful :-/.

You are correct, I do have an mds process running. I was only looking at my user processes. mds is owned by root.

And yes, the limited searches use a different index, possibly the Envelope Index. But a search on the entire message uses the Spotlight database, and I don&#039;t understand why it works for All Mailboxes but not when the focus is on a specific mailbox.</description>
		<content:encoded><![CDATA[<p>Yes, lots of things to try, and it&#8217;s quite painful :-/.</p>
<p>You are correct, I do have an mds process running. I was only looking at my user processes. mds is owned by root.</p>
<p>And yes, the limited searches use a different index, possibly the Envelope Index. But a search on the entire message uses the Spotlight database, and I don&#8217;t understand why it works for All Mailboxes but not when the focus is on a specific mailbox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ssp</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-7968</link>
		<dc:creator>ssp</dc:creator>
		<pubDate>Mon, 25 Feb 2008 23:58:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-7968</guid>
		<description>Interesting – a Spotlight problem I haven&#039;t had yet. I&#039;ll just toss in a few remarks.

* lsregister can be an extremely useful tool for dealing with the Launch Services database. I wouldn&#039;t use the kill option unless absolutely necessary though as that may also delete assignments of file types to applications which you may have made in the Finder. With a bit of luck something like lsregister -f /Applications/Mail.app might suffice for your purposes.

* If you see the problem more frequently it might be interesting to run lsregister -dump before rebuilding the Launch Services database. It would also be interesting to see mdls output for elmx files in /Library/Mail and to see whether searching for terms in those messages with mdfind in the Terminal yields any results. Then try running mdimport -d2 on one of those files and look at the output. Try whether using the -r option of mdimport for the Mail importer solves the problem. Try whether restarting solves the problem. Plenty of things to try out, I guess.

* You absolutely have an mds process on your system. If you don&#039;t Spotlight won&#039;t work, which would explain the problem as well. 

* I think that Mail&#039;s subject-only searching uses a database separate from Spotlight&#039;s. That can explain why those limited searches keep working.</description>
		<content:encoded><![CDATA[<p>Interesting – a Spotlight problem I haven&#8217;t had yet. I&#8217;ll just toss in a few remarks.</p>
<p>* lsregister can be an extremely useful tool for dealing with the Launch Services database. I wouldn&#8217;t use the kill option unless absolutely necessary though as that may also delete assignments of file types to applications which you may have made in the Finder. With a bit of luck something like lsregister -f /Applications/Mail.app might suffice for your purposes.</p>
<p>* If you see the problem more frequently it might be interesting to run lsregister -dump before rebuilding the Launch Services database. It would also be interesting to see mdls output for elmx files in /Library/Mail and to see whether searching for terms in those messages with mdfind in the Terminal yields any results. Then try running mdimport -d2 on one of those files and look at the output. Try whether using the -r option of mdimport for the Mail importer solves the problem. Try whether restarting solves the problem. Plenty of things to try out, I guess.</p>
<p>* You absolutely have an mds process on your system. If you don&#8217;t Spotlight won&#8217;t work, which would explain the problem as well. </p>
<p>* I think that Mail&#8217;s subject-only searching uses a database separate from Spotlight&#8217;s. That can explain why those limited searches keep working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre Igot</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-7967</link>
		<dc:creator>Pierre Igot</dc:creator>
		<pubDate>Mon, 25 Feb 2008 21:07:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-7967</guid>
		<description>I am afraid it doesn&#039;t help. Search for XXX in Entire Message still fails when the focus is on a specific mailbox rather than on &quot;All Mailboxes.&quot;

And there is no such thing as &quot;mds&quot; in Leopard, as far as I know. I quit &quot;mdworker&quot; just in case. mdutil spawned a process called &quot;Spotlight&quot;, which proceeded to reindex everything (took about half an hour). But the Mail searches still don&#039;t work right.</description>
		<content:encoded><![CDATA[<p>I am afraid it doesn&#8217;t help. Search for XXX in Entire Message still fails when the focus is on a specific mailbox rather than on &#8220;All Mailboxes.&#8221;</p>
<p>And there is no such thing as &#8220;mds&#8221; in Leopard, as far as I know. I quit &#8220;mdworker&#8221; just in case. mdutil spawned a process called &#8220;Spotlight&#8221;, which proceeded to reindex everything (took about half an hour). But the Mail searches still don&#8217;t work right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apple4ever</title>
		<link>http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/comment-page-1/#comment-7966</link>
		<dc:creator>apple4ever</dc:creator>
		<pubDate>Mon, 25 Feb 2008 20:07:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight-searches-in-mail/#comment-7966</guid>
		<description>I just had this happen to me. Here is the solution. 

1. Enter the following into Terminal:

sudo rm -R .Spotlight-V100/

2. Go into Activity Monitor. Find the process &quot;mds&quot;. Kill it. 

3. Enter the follow into Terminal:

sudo mdutil -E /

That should fix it (after Spotlight reindexes the drive).</description>
		<content:encoded><![CDATA[<p>I just had this happen to me. Here is the solution. </p>
<p>1. Enter the following into Terminal:</p>
<p>sudo rm -R .Spotlight-V100/</p>
<p>2. Go into Activity Monitor. Find the process &#8220;mds&#8221;. Kill it. </p>
<p>3. Enter the follow into Terminal:</p>
<p>sudo mdutil -E /</p>
<p>That should fix it (after Spotlight reindexes the drive).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

