Plugin: Faceted navigation - default category selection

Purpose

Set the facet default category selection based on other facet selections.

Usage

Enable the plugin

  1. Select Plugins from the side navigation pane and click on the Faceted navigation - default category selection 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.

Triggered facets value

Configuration key

plugin.facets-default-category-selection.config.*.selected-value

Data type

string

Required

This setting is optional

Defines the selected tab for the default category selection. This setting also controls whether the facets have a selected value. Parameter 1 defines the facets.

Default selected value

Configuration key

plugin.facets-default-category-selection.config.*.apply-on.*.default-value

Data type

string

Required

This setting is optional

Specifies the default selected value for the target facet. Parameter 1 defines the facets, and Parameter 2 defines the target facet name.

Is target facet metadata field?

Configuration key

plugin.facets-default-category-selection.config.*.apply-on.*.is-meta-facets

Data type

boolean

Default value

false

Required

This setting is optional

Specifies if the target facet is a meta facet. Parameter 1 defines the facets, and Parameter 2 defines the target facet name.

Meta class name

Configuration key

plugin.facets-default-category-selection.config.*.apply-on.*.meta-class

Data type

string

Required

This setting is optional

Defines the meta class for the target facet, only required if Is target facet metadata field? is true. Parameter 1 defines the facets, and Parameter 2 defines the target facet name.

When setting keys manually, you need to supply the key name and value.

Examples

Change the default facet category selection based on Tab selection

This example demonstrates that the site facet will be automatically selected if no other tabs have been previously selected.

Given:

  • A search package with 2 data sources; example~matrix and example~funnelback.

  • A tabbed facet (Tabs) has been configured with these categories:

    • All results, which returns documents from all data sources.

    • Matrix, which returns documents from the example~matrix data source.

    • Funnelback, which returns documents from the example~funnelback data source.

  • A facet called Format has been configured on the meta class type, which contains these categories:

    • Website

    • Image

    • Document

    • Video.

Configure the plugin as follows to select the Format facet as Website when the tab shows All results:

Configuration key name Parameter 1 Parameter 2 Value

Triggered facets value

Tabs

All results

Default selected value

Tabs

Format

Website

Is target facet metadata field?

Tabs

Format

true

Meta class name

Tabs

Format

type

Change log

[1.0.0]

  • Initial release.