In a Cocoa app of mine I do use NSMetadataQuery with <kMDItemTextContent LIKE "u_versionToString"> and setSearchScopes: {some array including "/usr/local/include").

I know that two files in my /usr/local/include do contain the string "u_versionToString".

Nothing is found. Probably because Spotlight in it's infinite wisdom did decide not to confuse me with stuff in /usr. (Wouldn't it be nice if Spotlight had some preference like "Unix Expert" (like the good old NextStep had) ? But I digress).

Ok, so I did:
mdimport /usr/local/include

A second later my query gets updated, the files for which I was looking appear and all is fine.

Until I open one of these files in some Editor.

The moment I do this, my query gets updated again, and the just opened file disappears.

And reappears when I do "mdimport /usr/local/include" again.

Silly and rather annoying game.

Question:
Is this a pure Spotlight problem (and so probably even off-topic in this list) or can I do something in my app to avoid this?

10.5.6

Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to