Artist's Tracks Search Procedure

26 views
Skip to first unread message

Nate Wickstrom

unread,
Oct 2, 2014, 12:52:10 AM10/2/14
to 7digit...@googlegroups.com
Hello,

What's the best way to search for tracks by a particular Artist?  For example, if I want to search for One by U2.

Things I've tried:

A. Use the Track/search API and query "One". 

This returned a list of about 190 results, but none of them were a track by U2.

B. Use the artist/topTracks API and then search for a tracked named "One".

TopTracks for U2 return 1825 items, so scanning the list, which would require 37 calls to the API, is impractical.

C. Use the Track/search API and query "One U2". 

This worked, as One by U2 was the first item in the response, but seems like this method could be error prone - like when a track by some artist equals a track name plus the artist name of another artist.  As a second layer of precaution, I could then check the artist name and track name with each list item, and hope to get lucky early in the list.  But, I was hoping there's a simpler way.


So basically, C. works but is there a better way ???

Thanks in advance!

Nate

Alex

unread,
Oct 2, 2014, 10:39:33 AM10/2/14
to 7digit...@googlegroups.com
Hi Nate,

Option C is your best option. I recommend you implement the "second layer of precaution" you mention, to make sure you really do get the artist + track you're looking for.

I realise this is not ideal, but we are continually improving our search functionality and your example has been noted so we may one day add a feature to make that search easier.

Thanks,
Alex



This email, including attachments, is private and confidential. If you have received this email in error please notify the sender and delete it from your system. Emails are not secure and may contain viruses. No liability can be accepted for viruses that might be transferred by this email or any attachment. Any unauthorised copying of this message or unauthorised distribution and publication of the information contained herein are prohibited.

7digital Limited. Registered office: 69 Wilson Street, London EC2A 2BB.
Registered in
England and Wales. Registered No. 04843573.

Nate Wickstrom

unread,
Oct 2, 2014, 11:18:36 PM10/2/14
to 7digit...@googlegroups.com
Hi Alex,

Thanks for the reply.  OK, I see.  

As a note for future readers, I also noticed that searching "guns and roses sweet child of mine" returns the Artist as "Guns N' Roses" and the track title as "Sweet Child O' Mine".  So a simply comparing strings wont work some of the time.  One option is to calculate the edit distance using Levenshtein distance algorithm, which measures the number of edits you would need to make one string into another.  Most likely there's already code for it in your preferred language somewhere on the web.  The trouble is that you still need to guess how many edits steps are acceptable.

Hope this helps,

Nate
Reply all
Reply to author
Forward
0 new messages