views:

378

answers:

3

Spotlight indexes at the file level, so a file containing a complicated data structure may need to be split into a set of files for Spotlight to index it in a useful way.

Can you use MacFUSE to achieve this more dynamically?

Will Spotlight index a MacFUSE volume?

Can MacFUSE handle the necessary per-file metadata?

Can a MacFUSE process notify Spotlight when attributes of a file change?

+2  A: 

You can use the mdutil command to enable indexing on external volumes. It should be applicable to MacFUSE volumes as well.

sudo mdutil -i on /Volumes/SomeVolume
codelogic
A: 

so a file containing a complicated data structure may need to be split into a set of files for Spotlight to index it in a useful way.

If you want to index a custom file, you need to write your own Spotlight indexer that understands this file type - XCode has a template for this.

Paul Betts
Yes -- I've written Spotlight Importers -- but I've never tried to use them with MacFUSE.
tdavies
+2  A: 

I've been testing with this myself.

I found this on the MacFuse Wiki: (http://code.google.com/p/macfuse/wiki/OPTIONS) if you wish to use Spotlight on a MacFUSE volume, you'll need to use allow_other.

I've discovered that it also works with allow_root.

However, I had to enable indexing myself by using mdutil -i on /Volume (as codelogic already mentioned)

So, if it does not work, try allow_root or allow_other

More testing: Allow_root does not work. it can index once, but it doesn't seem to index newly created files in subfolders. When changing to allow_other, it seems spotlight CAN detect the new changes, and index the new files. ==> allow_other is a requirement

kclement
Please edit your answer to include the information in this comment.
tdavies