get mapping types for search based on index
setup routing for search with type param
fixed code structure in templates