new index mapping, based on dynamic_templates
clean up imports
remove debug line
search own metadata for labels