Plugin: Rename facet categories

Purpose

Use this plugin if you need to change the value of any facet category labels.

When to use this plugin

  • Use this plugin if you need to change the labels that are displayed for any facet categories. The plugin allows you to specify a specific category within a facet and define a replacement label to display.

Usage

Enable the plugin

  1. Select Plugins from the side navigation pane and click on the Rename facet categories tile.

  2. From the Location section, select the results page to which you would like to enable this plugin from the Select a results page select list.

The plugin will take effect as soon as you finish running through the plugin setup steps.

Configuration settings

The configuration settings section is where you do most of the configuration for your plugin. The settings enable you to control how the plugin behaves.

The configuration key names below are only used if you are configuring this plugin manually. The configuration keys are set in the results page configuration to configure the plugin. When setting the keys manually you need to type in (or copy and paste) the key name and value.

Rename facet category

Configuration key

plugin.rename-facet-categories.config..category.

Data type

string

Required

This setting is required

Defines the replacement label for a facet category. Parameter 1 should be set to the facet name, and Parameter 2 should be set to the category that you want to rename. The value sets the new category name.

The rename facet category option can be set multiple times, and needs to be set for each category you wish to rename.

Examples

Update some category labels from two facets

The following example will result in Robert being displayed in the People facet in place of Bob; and United Kingdom being displayed in the Country facet instead of UK.

Configuration key name Parameter 1 Parameter 2 Value

Rename facet category

People

Bob

Robert

Rename facet category

Country

UK

United Kingdom

This plugin only changes the label for a facet category and will not combine categories that are renamed to the same label. For example if your facet already includes a category Robert and you rename Bob to Robert you will end up with two categories called Robert in the facet - one containing the count for items originally labelled Bob and the other for the pre-existing Robert category.

Change log

[2.0.0]

Changed

  • Updated to the latest version plugin framework (Funnelback shared v16.20) to enable integration with the new plugin management dashboard.

  • Updated the configuration key format to be compatible with the updated version of the plugin framework. The key format has changed from plugin.rename-facet-categories.config.<facet_name>.<category_label> to plugin.rename-facet-categories.config.<facet_name>.category.<category_label>.

    This is a breaking change and if you are upgrading from an older version the existing keys will need to be updated to the new format.