Text book used for the second part is found in http://dspace.cusat.ac.in/dspace/bitstream/123456789/2538/1/InformationRetrieval.pdf
http://nlp.stanford.edu/IR-book/pdf/irbookonlinereading.pdf