PDA

View Full Version : Limit search scope in a NSMetadataQuery




Saphrosit
Oct 10, 2010, 10:17 AM
Hi everybody, I need to limit the search scope of a NSMetadataQuery item. I know there's the setSearchScopes method, but it let me only decide the directories in which to search; what if I need to search in all directories except one or two? Is there a way to do that? (except, of course, set as search scope all the other directories!)



kainjow
Oct 10, 2010, 02:36 PM
From a quick glance at the docs, I would say you can't do this besides what you suggest, or filtering those directories out of the results.

kpua
Oct 10, 2010, 02:38 PM
No, there's no API to do that. It would probably be easier to just search everything and filter the results from the directories you wish to exclude.

Saphrosit
Oct 11, 2010, 09:55 AM
Ok, thanks! (Maybe apple should think at something like that...)

kpua
Oct 11, 2010, 11:40 AM
File an enhancement request

Saphrosit
Oct 12, 2010, 06:34 AM
How? I thought I could only report bugs or send feedbacks about products...

kpua
Oct 12, 2010, 10:42 AM
Just use bugreport.apple.com. You can file an enhancement request there.