Plugin: Faceted navigation - facet display order

Purpose

Use this plugin to control the order that facets are returned in the data model.

When Funnelback returns faceted navigation in the search response, the order in which the facets appear in the data model is based on the order in which the faceted navigation appears in the facet configuration.

This order appears somewhat random and can change when the configuration is updated.

It is generally up to the template layer to set the order in which the facets are presented. However, if this is not done, then faceted navigation will be presented in the order that it is returned, and this is often undesirable.

This plugin will reorder the facets to allow controlling the order in which they are returned in the data model.

This plugin is used to set the display order of your facets. If you wish to update the order of your facet categories, use the Faceted navigation categories - custom sort order plugin.

Usage

Enable the plugin

  1. Select Plugins from the side navigation pane and click on the Faceted navigation - facet display order 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.

Facets to list first

Configuration key

plugin.facet-display-order.config.order.first

Data type

string

Required

This setting is optional

Defines the order of a set of facets to display first. The listed facets should be delimited using a vertical bar (pipe) character. Vertical bar characters appearing in a facet name should be escaped with a backslash character.

Any matching facets will be listed in the configured order before all other non-matching facets. Only the facets returned will be listed.

Facets to list last

Configuration key

plugin.facet-display-order.config.order.last

Data type

string

Required

This setting is optional

Defines the order of a set of facets to display last. The listed facets should be delimited using a vertical bar (pipe) character. Vertical bar characters appearing in a facet name should be escaped with a backslash character.

Any matching facets will be listed in the configured order after all other non-matching facets. Only the facets returned will be listed.

  • If a facet name is listed more than once in the order, the last entry applies. e.g. F3|F4|F3|F2 will result in the following order: F4 F3 F2 then other facets.

  • If a facet name is listed in both the FIRST and LAST sort lists, then the entry in the LAST list will apply.

  • Empty and non-matching facet names in the sort lists are ignored.

  • If a facet name contains a vertical bar character, it should be escaped with a backslash, e.g., a name of FACET | X should be listed in the sort order as FACET \| X

Examples

Consider a search with the following facets, returned by default in the following order:

  1. Genre

  2. Publisher

  3. Author

  4. Year of release

  5. Format

If you wish to list "Author" and "Publisher" as your first two facets, you can set the following plugin configuration:

Configuration key name

Value

Facets to list first

Author|Publisher

If you wish to list "Year of release" last:

Configuration key name

Value

Facets to list last

Year of release

If you set both of these in your configuration, the resultant order will be:

  1. Author

  2. Genre

  3. Publisher

  4. Format

  5. Year of release

Change log