Search - kristinedomingo/cs373-idb GitHub Wiki

SEARCHING FOR MY JAM

Intro

The search capability of this website is based on searching on what is inside the Database between the 3 Model: Artist, Album, Track. The search does not use any special already made MYSQL search library it is our hand-made.

Methods

search_db(word): takes in a string word and returns json file that can be found in the Design page find_word_artist(word, artist), find_word_album(word, album), find_word_track(word, track): returns a positive integers if the word was found and a -1 if it is not. Use the find method of the string in python which locates if the word exist.

Contextualize

bold_artist(artist, words),bold_track(track,words), bold_album(album, words): returns a strings that has the specific words, given in the argument that is going to be bold, found in any column of each model.