I've come to understand that in order for Spotlight comments to be viewable in the Finder, the extended attributes have to be written to the appropriate .DS_Store file. The problem is, every time I add Spotlight comments using the Finder's Get Info window, they get picked up by Spotlight for searches but very soon after are no longer viewable in the Finder. (In other words, the information was successfully written to the extended attributes, but not to the .DS_Store file.)
[UPDATE: This may have to do with the number of items that reside in the parent folder of the .DS_Store file. Comments remain visible in test folders that contain very few items.]
Could permissions or ACLs be coming into play?]
According to this answer, it seems the Finder will only correctly write the information to .DS_Store when the Finder is run as root; however, this is extremely inconvenient to have to relaunch the Finder every time I want to add information to the Spotlight Comments field in the Get Info window. (Regardless, I haven't tested if this would even work reliably; somehow, I have my doubts.) [As I suspected, this doesn't work.] Out of desperation, I've erased my spotlight index and am currently reindexing my entire hard drive. (I've done this many times before, however, without luck.) [This changed nothing.]
The information is there, it's searchable; it just can't be viewed directly in the Finder (which is my primary use case) and therefore can't be edited in the Finder either, without being completely overwritten. It's hard for me to believe Apple would ship something this fundamentally broken. It makes Spotlight comments completely worthless to me. (Are spotlight comments this terrible for everyone else?)
Does anyone know a way to scan a disk/folder for spotlight comments and then write them to their .DS_Store files so they're viewable/editable through the Finder?
mdimport doesn't seem to be able to do it.
Alternately, is there a way to rebuild .DS_Store files from first principles like there is with the spotlight index?