Search Kit Proximity Searching
Search Kit Proximity Searching
- Subject: Search Kit Proximity Searching
- From: Steve Scott <email@hidden>
- Date: Thu, 5 Mar 2009 12:10:56 +0000
I am having trouble with proximity searching using Search Kit under OS
X 10.5.6.
I have two simple text documents in my index one just contains the
phrase
"Sometimes I am amazed at how stupid Scotty can really be!"
and the other contains the phrase
" I am amazed at how stupid some people are compared to the brilliant
Scotty and the mac"
When I declare the index I do it with the following code.
NSDictionary *properties = [NSDictionary dictionaryWithObjectsAndKeys:
0, @"kSKMaximumTerms",
kCFBooleanTrue,@"kSKProximityIndexing", nil];
filesIndex = SKIndexCreateWithMutableData(
(CFMutableDataRef)[NSMutableData data],
CFSTR("Files Index"),
kSKIndexInverted,
(CFDictionaryRef)properties);
When I do a search on the phrase "amazed at how stupid some" only the
file containing the second phrase is returned which seems correct but
if I search for the phrase "amazed at how stupid Scotty" the search
returns both files which does not match my expectation from the
documentation.
If I was just searching for the separate words it would make sense but
not when searching for a phrase. The docs all say Search Kit only
supports phrase searching not proximity searching so I would only
expect to receive the file containing the first phrase as a result for
this second search.
I am going mad, doing something stupid or just mis-understanding this
whole thing completely.
Thanks in Advance
Scotty
The Mac Developer Network
http://www.mac-developer-network.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden