My site uses Search API and Facet API for search.
My user search has several entity references that are also indexed. So, when just two facets are activated, this gives me a URL like this:
This is way too long. What I'd like to do is collapse the
co (country) and
I know that Facet API Pretty Paths can be used to shorten the URLs but because I have about 20 facets, the regex that it uses seems to really kill performance. I am also thinking about using Search API Page, which does not work with FacetAPI Pretty Paths. So, I was hoping to find a way to rename the facets themselves in code.
I have my facets exported using the Features module. I tried changing
$facet->name, but this had no affect on the results:
$facet->name = 'search_api@om_user_search::field_acc_gen:field_language'; $facet->searcher = 'search_api@om_user_search'; $facet->realm = ''; $facet->facet = 'field_acc_gen:field_language';
$facet->name = 'search_api@om_user_search::la';
How can I programmatically rename a facet?