Spotlight 不會 index 的路徑

本區專門提供 Mac OS X 使用者交換使用心得

版主: ross_ttbryanchangdigdogchester

回覆文章
內容
發表人
頭像
fortepianissimo
基本會員
文章: 81
註冊時間: 09/08/2004 6:17 am

Spotlight 不會 index 的路徑

#1 文章 fortepianissimo »

這些是寫死在 mds 這個執行檔裡的。

Many items in /Library
/AppleInternal/Library
/Developer/ADC Reference Library
/Developer/Documentation
/Previous Systems.localized
/Network
/Volumes
/private
/tmp
/var
/etc
/usr
/bin
/sbin
/dev
/automount
/cores
/mach.sym
/iPod_Control
/System Folder
/Classic
/System/System Folder
/Classic System Folder 9.2.2


UPDATE: 看來這些有被 index。

/Desktop
/Documents
/Music
/Movies
/Pictures
/Applications
/Users/Shared
/System/Library/Fonts
/System/Library/PreferencePanes
/Users

這些路徑來源是用 strings 這個命令得來的:

strings /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/mds

所以其實並不清楚這些究竟是內定 "要" 索引還是不要索引的目錄。
最後由 fortepianissimo 於 05/26/2005 11:08 am 編輯,總共編輯了 3 次。
頭像
ulysses
討論區管理員
文章: 2475
註冊時間: 05/18/2001 1:01 am
來自: Forgotten Realm
聯繫:

#2 文章 ulysses »

Dashboard 不會 index 的路徑?

- or -

Spotlight 不會 index 的路徑?
ash nazg durbatuluk, ash nazg gimbatul,
ash nazg thrakatuluk agh burzum-ishi krimpatul.
頭像
fortepianissimo
基本會員
文章: 81
註冊時間: 09/08/2004 6:17 am

Re: Spotlight 不會 index 的路徑

#3 文章 fortepianissimo »

fortepianissimo 寫:這些是寫死在 mds 這個執行檔裡的。
...
/Developer/ADC Reference Library
/Developer/Documentation
...
想要 index 這些路徑,請修改

/.Spotlight-V100/_rules.plist

可以用 Proeprty List Editor (如果你安裝了 Xcode 的話);在 Terminal 下打

sudo /Developer/Applications/Utilities/Property\ List\ Editor.app/Contents/MacOS/Property\ List\ Editor /.Spotlight-V100/_rules.plist


請注意你必須加入完整的路徑,而不是它們的上一層目錄;例如想要 index

/Developer/ADC Reference Library

光加入

/Developer

是不夠的。要加入完整的路徑。


要怎樣修改該檔案應該一目了然(如果你不知道怎麼改,最好還是別動)。

順帶一提,以下是修改 _rules.plist 的前置動作

mdutil -i off / (關閉 indexing)
mdutil -E / (移除 index)

之後再

mdutil -i on / (打開 indexing)

(也許有更快的方法)
回覆文章