• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Search Kit Proximity Searching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: [Q] NSObject's poseAsClass - Replacement?
  • Next by Date: Re: [Q] NSObject's poseAsClass - Replacement?
  • Previous by thread: Re: [Q] NSObject's poseAsClass - Replacement?
  • Next by thread: Re: Question about the Foundation Framework
  • Index(es):
    • Date
    • Thread