tags retrieval with map and union