Results 1 to 1 of 1

Thread: Complex Search Query

  1. #1
    Join Date
    Feb 2011
    Waterloo, Ontario, Canada

    Complex Search Query

    Hey all. I'm trying to get used to this whole FULLTEXT index thing. I have a search field where a user looks for music. He can either enter in the name of a song, the artists name, etc.

    I have 2 tables.

    The first is the table of artists (tblArtists) that looks something like:
    ArtistId, Name, etc.

    The second is the table of songs (tblSongs) that looks something like:
    SongId, UserId, Title, etc.

    Now, if a user types in 'Kanye West', obviously it wouldn't match any song titles, but Kanye West's songs should have greater relevance than those songs that contain either words 'Kanye', or 'West'. I know MATCH searches can't be done with multiple tables. So really I need to make my own sort of scoring system. Any best practices on how I should go about doing this?

    I also have a need to do the opposite. I need to display the artist most relevant to the search. For example, 'Gold Digger' wouldn't match any artist's name, but Kanye West would obviously be relevant to the search (there's a Plays column in tblSongs that keeps track of # of plays on the site that would be a help in scoring this).
    Last edited by Galway; 05-21-2012 at 12:58 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center