refactored MapScorer class to make retrieval score reusable.