• 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
Relevance Ranking for String Comparison
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Relevance Ranking for String Comparison


  • Subject: Relevance Ranking for String Comparison
  • From: Mijobee Kenobi <email@hidden>
  • Date: Tue, 28 Mar 2006 13:18:48 -0500

I'm looking for a method of comparing a search string with another arbitrary string and calculating some sort of valid relevance ranking for it. I tried using the Spotlight API but I haven't gotten any value other than zero and it looks like that's because Spotlight doesn't provide relevance rankings when only searching the display name. Are there any provided methods for calculating relevance? I've included the relevant lines of code in case I'm just doing something wrong, I can post more if necessary. Thanks in advance.


Query:
(kMDItemDisplayName == \"*saf*\"cd) && (kMDItemContentTypeTree == 'com.apple.application') && (kMDItemContentType != com.apple.mail.emlx) && (kMDItemContentType != public.vcard)


Code Snippet:
...
itemRef = (MDItemRef)MDQueryGetResultAtIndex(queryRef, 0);
relevance = MDItemCopyAttribute(itemRef, kMDQueryResultContentRelevance);
_______________________________________________
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


  • Follow-Ups:
    • Re: Relevance Ranking for String Comparison
      • From: Vince DeMarco <email@hidden>
  • Prev by Date: Re: Memory Management question
  • Next by Date: NSGraphicsContext size limit?
  • Previous by thread: Re: Keyboard Shortcut without Menu Item
  • Next by thread: Re: Relevance Ranking for String Comparison
  • Index(es):
    • Date
    • Thread