M1 MacBook Pro(Ventura系统)Spotlight元数据索引异常及Finder标签不生效问题求助
M1 MacBook Pro(Ventura系统)Spotlight元数据索引异常及Finder标签不生效问题求助
我刚拿到一台运行Ventura系统的M1 MacBook Pro,用Time Machine恢复了所有数据。一开始Spotlight搜索不正常,折腾mdutil命令后搜索问题解决了,但现在又遇到新麻烦——Finder的颜色标签汇总里看不到已标记的文件。
我仔细排查后发现,Spotlight根本没索引文件的非FS前缀元数据,只有kMDItemFS...系列的属性能被正常索引到。举个实际测试的例子:
我给文件test.txt标记了紫色标签(标签名称为"Test"),执行xattr -l test.txt能看到正确的属性输出:
com.apple.FinderInfo: com.apple.metadata:_kMDItemUserTags: bplist00?VTest 3
但运行mdls test.txt时,输出里完全看不到标签相关的属性,只有这些FS开头的项:
kMDItemFSContentChangeDate = 2023-08-17 15:51:00 +0000 kMDItemFSCreationDate = 2023-08-17 15:51:00 +0000 kMDItemFSCreatorCode = "" kMDItemFSFinderFlags = 6 kMDItemFSHasCustomIcon = 0 kMDItemFSInvisible = 0 kMDItemFSIsExtensionHidden = 0 kMDItemFSIsStationery = 0 kMDItemFSLabel = 3 kMDItemFSName = "test.txt" kMDItemFSNodeCount = 0 kMDItemFSOwnerGroupID = 20 kMDItemFSOwnerUserID = 501 kMDItemFSSize = 0 kMDItemFSTypeCode = ""
而把这个文件拷贝到另一台Mac上,mdls test.txt能输出完整的元数据,包括kMDItemUserTags和其他非FS属性:
_kMDItemDisplayNameWithExtensions = "test.txt" com_apple_metadata_modtime = 713980260 kMDItemContentCreationDate = 2023-08-17 15:51:00 +0000 kMDItemContentCreationDate_Ranking = 2023-08-17 00:00:00 +0000 kMDItemContentModificationDate = 2023-08-17 15:51:00 +0000 kMDItemContentModificationDate_Ranking = 2023-08-17 00:00:00 +0000 kMDItemContentType = "public.plain-text" kMDItemContentTypeTree = ( "public.plain-text", "public.text", "public.data", "public.item", "public.content" ) kMDItemDateAdded = 2023-08-17 16:16:17 +0000 kMDItemDateAdded_Ranking = 2023-08-17 00:00:00 +0000 kMDItemDisplayName = "test.txt" kMDItemDocumentIdentifier = 0 kMDItemFSContentChangeDate = 2023-08-17 15:51:00 +0000 kMDItemFSCreationDate = 2023-08-17 15:51:00 +0000 kMDItemFSCreatorCode = "" kMDItemFSFinderFlags = 6 kMDItemFSHasCustomIcon = (null) kMDItemFSInvisible = 0 kMDItemFSIsExtensionHidden = 0 kMDItemFSIsStationery = (null) kMDItemFSLabel = 3 kMDItemFSName = "test.txt" kMDItemFSNodeCount = (null) kMDItemFSOwnerGroupID = 20 kMDItemFSOwnerUserID = 501 kMDItemFSSize = 0 kMDItemFSTypeCode = "" kMDItemInterestingDate_Ranking = 2023-08-17 00:00:00 +0000 kMDItemKind = "Reines Textdokument" kMDItemLogicalSize = 0 kMDItemPhysicalSize = 0 kMDItemUserTags = ( Test )
我已经试过以下命令的各种组合来重置Spotlight索引,但都没有效果:
mdutil -i off /mdutil -i on /mdutil -Emdutil -X
有没有其他办法能解决这个Spotlight元数据索引不完整的问题?
备注:内容来源于stack exchange,提问作者Manuel
相关产品推荐
相关产品推荐

