Refactor search mapper