[mb-devel] Is there any more info on the ext:rating returned by the xmlwebservice when you sort for tracks without a Puid

Robert Kaye rob at eorbit.net
Mon Dec 4 21:57:11 UTC 2006


On Dec 1, 2006, at 3:21 AM, Paul Taylor wrote:
> http://wiki.musicbrainz.org/XMLWebService?highlight=%28xml%29%7C% 
> 28schema%29
> 'For example, you can use a filter to only request artists with the  
> name "Tori Amos": http://musicbrainz.org/ws/1/artist/? 
> type=*xml*&name=Tori+Amos. The Filters supported depend on the  
> collection and are described below. Data returned from collections  
> will also have an ext:rating value="[rating]" attribute that  
> indicates the rating returned from the search engine -- the rating  
> value is between 0 and 100.'
>
> If you provide provide multiple parameters such as  
> artist,title,release .. I take it is not a strict boolean 'AND'  
> search and they are possibly weighted in some way,  but cannot find  
> any details of how this works, I also assume that some the text  
> values work on a soundex value or something but not sure.

Keep in mind that collections are handled by Lucene. Lucene is the  
searching engine that MB uses to do indexed searches and the  
ext:rating is the lucene score returned for that search result. Here  
is more than you ever want to know about Lucene scoring:

http://lucene.apache.org/java/docs/scoring.html

> But if I (incorrectly) change tracknum to another value the same  
> results are returned with the same ext:rating, it is great that it  
> is finding a match but I dont understand why the rating is still 100
>
> And if I change the title quite radically :
> http://musicbrainz.org/ws/1/track?type=xml&artist=Abba&release=Abba 
> +Gold&tracknum=02&title=kjhkjkjkjjj+knowing+pou, it still continues  
> to find the matches, and award them a rating 100 even though title  
> is now substantially different.

This is the beauty of Lucene -- it doesn't just do exact searches. It  
does stemming and similar searches in an effort to find you relevant  
results.

--

--ruaok      Somewhere in Texas a village is *still* missing its idiot.

Robert Kaye     --     rob at eorbit.net     --    http://mayhem-chaos.net





More information about the MusicBrainz-devel mailing list