<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>The BFC Computing Weblog: Fixing Corrupted Spotlight Indexes</title>
    <link>http://blog.bfccomputing.com/articles/2007/04/29/fixing-corrupted-spotlight-indexes</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>My God, It's Full of Source!</description>
    <item>
      <title>Fixing Corrupted Spotlight Indexes</title>
      <description>&lt;p&gt;One of the more interesting features of Mac OS X is its &lt;a href="http://www.apple.com/macosx/leopard/spotlight.html"&gt;Spotlight&lt;/a&gt; - a system-wide metadata database (metadatabase?) that was obviously rushed out the door before it was completely baked.   &lt;/p&gt;

&lt;p&gt;For a couple weeks I haven&amp;#8217;t been able to do full-text searches of my e-mail store - it just stopped working.  I found in the Spotlight preferences, the hard drive was added to the &amp;#8216;Privacy&amp;#8217; pane (not by me) and it couldn&amp;#8217;t be removed.  Looking at the actual files (/.Spotlight-V100/) the modification times were changing but the size of the database files never did.  Nothing in the logs about it.&lt;/p&gt;

&lt;p&gt;After several dead ends, I finally figured out that one just needs to remove all the Spotlight files and reboot.  One nice advantage of the Spotlight architecture is this is non-destructive - everything will be re-built automatically.  One disadvantage is everything has to be re-built automatically, so it&amp;#8217;s resource intensive.  Anyhow, the exercise distills down to:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo mdutil -i off /
sudo mdutil -E /
sudo rm -rf /.Spotlight-V100/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then restart the computer.  This &lt;a href="http://www.thexlab.com/faqs/stopspotlightindex.html"&gt;article&lt;/a&gt; from The X Lab is the most comprehensive, accurate, and intelligible reference to Spotlight workings I found on the &amp;#8216;net.&lt;/p&gt;</description>
      <pubDate>Sun, 29 Apr 2007 15:38:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:e72e3a99-5eeb-4b53-ba89-47318f00e650</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2007/04/29/fixing-corrupted-spotlight-indexes</link>
      <category>Mac</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4644</trackback:ping>
    </item>
  </channel>
</rss>
