if element["name"].count("_") > 0:
// We also modify the dispay name to remove the id
element["display_name"] = element["name"][element["name"].find("_")+1:]
element["params"] = "%s %s:"%s"" % (filter_query, flt, urlquote_plus(element["name"]))
filtered_facet.append(element)
else:
element["display_name"] = element["name"]
element["params"] = "%s %s:"%s"" % (filter_query, flt, urlquote_plus(element["name"]))
After Change
if element["name"].count("_") > 0:
// We also modify the display name to remove the id
element["display_name"] = element["name"][element["name"].find("_")+1:]
element["params"] = u"{0} {1}:"{2}"".format(filter_query, flt, urlquote_plus(element["name"]))
else:
// If facet element belongs to "grouping pack" filter but does not have the "_" character in it, it
// means this corresponds to the "no pack" grouping which we don"t want to show as a facet element.
continue