PDA

View Full Version : Some Questions About The Disable_Spotlight Script


Herbert Schulz
05-30-2005, 12:32 PM
Howdy,

I've installed the disable_spotlight script and it works very nicely; no more unwanted spotlight indexing! But I have a couple of questons.

1)I assume that ``-i off'' option writes a note in some hidden file (I can't even ``sudo ls'' the /.Spotlight-V100 directory!) so that the Volume will not be indexed from then on. If I continue to use the script as a customization script will there be multiple entries in that file or is mdutil smart enough to see that the disabling of indexing on that Volume is already set? I'm a bit worried that the file will grow continuously and ``man mdutil'' isn't much help.

2)Since I make complete bootable images on a backup drive (has saved me more than once) when I recopy back onto my internal drive after a disaster will the original drive be indexed or will I have to run mdutil with the ``-i on'' option?

After setting up SuperDuper with the customization script (of course I had to manually put the volume on my private list the first time) it works!

Thanks for any information you can provide.

Good Luck,
Herb Schulz

dnanian
05-30-2005, 01:45 PM
Herb:

Actually, since it's not documented I don't know where the information about disabled volumes is kept, but I wouldn't worry about it growning a lot. I can't believe Spotlight and mdutil would be that broken.

I believe that once you restore the volume it will be indexed again, but I haven't done extensive tests on this. But, if you see that it's not being indexed, it's easy enough to turn it on.

(WHen I looked at this it seemed less permanent than you might think -- sometimes reattaching teh drive would have it get indexed again. Spotlight is still pretty new, and I'm sure Apple is working hard to make its management a bit more transparent and logical.)

Hope that helps!

Herbert Schulz
05-30-2005, 02:00 PM
Howdy,

Thanks for the quick response.

I'd also hope that mdutil is smart enough to figure this out too. I must admit that my initial problems with 10.4 are finally beginning to smooth out and I'm actually enjoying it and finding Spotlight quite useful; although not ``letting'' me see the ``hidden'' files in /bin/ and /usr/local/ is kind of stupid - the old Cmd-F behavior in Finder at least had a sticky option that allowed that.

As you said, it's new technology and will all get straightened out by 10.4.x.

Good Luck,
Herb Schulz

dnanian
05-30-2005, 03:40 PM
Yeah, spotlight does have some rough edges. I've heard others complain about the lack of flexibility in some areas, too, so you're not the only one who misses some of the stuff that you used to be able to with Cmd-f.

But, give them time. It's v1.0 of spotlight, still. No doubt there are lots of planned improvements, and it'll get better from here. When it does work, it does some pretty nice stuff, even now!

sjk
06-13-2005, 03:38 PM
Actually, since it's not documented I don't know where the information about disabled volumes is keptApparently it's stored in the Policy key of a volume's Spotlight-V100/_IndexPolicy.plist file (when it exists, e.g. created with mdutil). And creating a .metadata_never_index file in a volume's root directory may be another way to disable indexing. There's also a magic .metadata_index_homes_only file. I haven't tested either of those and wouldn't rely on them anyway.

dnanian
06-13-2005, 03:49 PM
Yes, we've found that as well, but since it's not documented we're reluctant to rely on it...

Herbert Schulz
06-13-2005, 04:06 PM
Apparently it's stored in the Policy key of a volume's Spotlight-V100/_IndexPolicy.plist file (when it exists, e.g. created with mdutil). And creating a .metadata_never_index file in a volume's root directory may be another way to disable indexing. There's also a magic .metadata_index_homes_only file. I haven't tested either of those and wouldn't rely on them anyway.

Howdy,

I see (and can cat) a .Spotlight-V100/_IndexPolicy.plist file on my backup drive. It has a variable Policy set to 3, whatever that means. I'm guessing that gets eliminated when I do the backup of my system drive to that drive and the script that SuperDuper runs after the backup then re-creates it for the next backup.

That would also mean that you will have to set it active on a disk you build from the backup; i.e., mdutil -i on /Volumes/VolName.

Good Luck,
Herb Schulz