More elegant way of implementing search mappings