map_reduce is applied for finding the matches, though not that much useful in this stage. sample code can be used for future requirements.