Re: Spotlight search speed problems?
Re: Spotlight search speed problems?
- Subject: Re: Spotlight search speed problems?
- From: Vince DeMarco <email@hidden>
- Date: Thu, 16 Jun 2005 08:43:10 -0700
On Jun 15, 2005, at 9:20 PM, Colin Cornaby wrote:
Hey, I'm doing a search using MDQuery and it's running much slower
than a search for the same term in the spotlight menu. The menu can
complete the search in about 3 seconds, while my app can take 9-13
seconds for the same search. Here is the code I am using:
MDQueryRef query;
query = MDQueryCreate(kCFAllocatorDefault,
CFSTR("kMDItemFSName == '*.radiusconfig'"),
NULL,
NULL);
NSLog(@"Starting query");
MDQueryExecute(query, kMDQuerySynchronous);
NSLog(@"Ending query");
I am also wondering if I can run more than one set of search
conditions in a query. For example, I want to search for files
ending in both .radiusconfig and .stellarradius. Thanks!
All FS type searches are slower
the menu does this
kMDItemDisplayName == "*.radiusconfig"
this will be much faster
DisplayName is the cached name as you would see in the Finder, FSName
does a catalog search
Vince
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden