Facetapi: Rewrite facet machine names? I am working on a website with facetapi + search_api, with some facets for taxonomy term references.

One of my facets is getting the machine name field_xyz_parents_all or field_xyz:parents_all, which in the URL this becomes field_xyz%253Aparents_all.

I want this facet to replace the older facet with machine name field_xyz, so that old URLs still work. So I would like to change the machine name or url query key of the new facet.

Any idea how to do this?

One idea I have would be to implement hook_entity_property_info_alter() and define my own entity property with the desired machine name, overwriting the existing entity property field_xyz. I imagine this would work, but it somehow seems wrong, because in other places I might want to keep the original meaning of this property. Ideally I would only change the facet query key, not the property.

EDIT: The original intent I had with this was to change the facet alias used in the url. However, changing the question to clarify this would make it a "chameleon question". Hence, I don't.
For completeness: If what you need is to change the facet alias, not the machine name, then the FacetAPI Alias module seems to do exactly this.

If you also consider using facetapi_pretty_paths, this issue might be interesting: Is facetapi_alias compatible with facetapi_pretty_paths ? (compatible, overlapping functionality, compliment one another?)