How to fix Spotlight when it keeps indexing in Mac OS X Lion

Today I noticed that the fan of my MacBook was continuously spinning because my Spotlight kept indexing for hours. Even when it was finished, a couple moments later it started reindexing again. After searching Google for a while finding no working solutions, I finally found one that worked for me.

Spotlight keeps indexing – the fix

If you execute the following command in your Terminal (Applications/Utilities) Spotlight should stop indexing (N.B. make sure you copy it exactly.):

sudo rm -rf /.Spotlight-V100/*

Re-index Spotlight

The above command deletes your current corrupted index. Now execute the following command to force a re-index of Spotlight for one-time(If it gives you a -400 error, rebooting and trying again should work). After running the command, Spotlight should start re-indexing within a minute.

sudo mdutil -i on -E /

Please note: It might seem that the problem hasn’t been solved, but the second command tells Spotlight to do a real, proper reindex. If everything is okay, it doesn’t reindex indefinitely now, but should be done in a couple of hours.

This is not a permanent solution, as the problem happened to me twice in the last eight months. So if your Spotlight keeps indexing too, please do let me know it it worked for you, and if you have any other solutions or know the root cause of this problem.

MacBook Air 13″ vs MacBook Pro 13″: Why I Bought The Air

A couple of weeks ago, Apple upgraded their MacBook Air line; the Air too is now equipped with an i5 processor, just like its bigger Pro brother. As my current MacBook is turning three years old this month, I thought about getting a new one. For me, there were only two models between which I needed to choose. I want a 13″ sized laptop and no expensive upgrades; so either the basic MacBook Air 13″ ($1299) or the MacBook Pro 13″ ($1199).

Macbook Pro 13-inch vs MacBook Air 13-inch

With the latest upgrade the technical differences between both models are smaller than ever.

Macbook Pro’s advantages

  • Faster i5 processor (2.3 GHz vs 1.7 GHz)
  • Bigger hard disk (500GB vs 128GB)
  • HD webcam built in (Air just has SD)
  • Has optical drive, ethernet, and FireWire port (Air doesn’t)

MacBook Air’s advantages

  • Lighter (2.96lbs vs 4.5 lbs)
  • Thinner
  • Higher resolution (1440×900 vs 1280×800)
  • Faster hard disk (SSD vs HDD)
  • No glare screen

My considerations

Some of the differences between the two I don’t care about. I never use FireWire and haven’t used both my ethernet port and optical drive for the last two years. Also I don’t really care about the different webcams as the SD one in my current MacBook has always performed just fine for Skype-usage.

So then it’s down to the difference in processor speed and bigger hard disk (in favor of the Pro) and resolution, size, weight and faster hard disk (in favor of the Air).

Subsequently, I tried to find information on the difference in performance between both models. A lot of websites just bluntly state that the Pro is faster because its processor’s clock speed is 0.6 GHz higher. However, Macworld did some benchmarks and showed that for a lot of tasks the MacBook Air 13″ actually performs much better than the MacBook Pro 13″ because of its faster, SSD hard disk.

Why I bought the Air

The choice thus basically comes down to: Do I want a MacBook Pro with a bigger harddrive or a much lighter, smaller MacBook Air with a better resolution and often better performance. Boiling it down to this, making a choice was pretty easy. To me, the $100 difference in prize is well-worth the increased portability, higher resolution and better performance of the MacBook Air.