Implemented function score query and all the score functions