Facet categories

Description

Facet category values are the individual filter choices that appear beneath a facet.

Each facet contains one or more facet categories. Selecting a facet category will filter the search results on include only results that include the category (subject to any other selected categories and the matching logic).

Category sources

Facet categories are sourced from a number of different things. Understanding how the facets and facet categories relate to the source data is important for creating effective faceted navigation (and for planning site redevelopments to make use of facets).

Facets based on metadata

A facet that has category values sourced from predefined values contained within a metadata or XML field (metadata) has a 1:1 relationship between the facet and a Funnelback metadata class.

The categories that can appear beneath a metadata facet are all the unique values found within the metadata class. The count for each category is the number of unique times that the metadata value is found within the result set.

By default, Funnelback will lowercase the values of metadata fields so that all variants (in terms of case) will be counted together. e.g. Example and example will both be counted together. To treat the facet labels as case-sensitive (as they appear in the source metadata field) you need to add the following to the query processor options that are specified on your results page: -rmc_sensitive=true. See also: Faceted navigation - capitalizing the category names

Category values based on URL patterns or generalized scopes

A facet that has category values sourced from predefined URL sets (gscope) or a set of URL patterns (URL pattern) has a 1:1 relationship between each category and a defined URL pattern set or generalized scope.

The category label is determined by the label assigned when creating the facet.

The count for each category is the number of items in the result set that belong to the defined URL pattern set or gscope.

Category values based on URL path or directory structure

A facet that has category values sourced from the item’s location in a URL path or directory structure (URL fill) has a 1:1 relationship between the facet and a defined root URL or folder.

The categories are determined by splitting the URL on the folder structure (with folder names as the possible categories) to a determined depth. The depth defines a hierarchical structure to apply to the facet.

The count for each category is the number of results that sit beneath the folder.

URL based categories should not be used for large collections with a flat structure. For example if every URL PATH was 1/index.html, 2/index.html, n/index.html then the facet would shown numbers 1,2,…​,n which are not helpful for user to drill down on. Additionally, when gathering from web collections, the hostname cannot be used as a category within a URL based facet - only directories (path-elements) can be used in this way.

Category values based on date

A facet that has category values sourced from groupings based on the item’s date (dynamic date fill) has a 1:1 relationship between the facet and the document’s indexed date value.

Dates are grouped into the following categories:

  • Coming year

  • Coming month

  • Coming week

  • Tomorrow

  • Today

  • Yesterday

  • Past week

  • Past fortnight

  • Past month

  • Past 3 months

  • Past 6 months

  • Past year

  • Year (e.g. 2017, 2014)

  • Uncertain

Additional categories can’t be defined, but categories can be removed using the blacklisting options or renamed.

Category values based on results from a query

A facet that has category values sourced from documents which match a particular query has a 1:1 relationship between each category and the set of URLs retuned for the defined query.

The category label is determined by the label assigned when creating the facet.

The count for each category is the number of items in the result set that are in the set of results returned for the defined query.

Category values coming from a specific data source

A facet that has category values sourced from documents which belong to a particular collection has a 1:1 relationship between each category and membership to sets of collections.

The category label is determined by the label assigned when creating the facet.

The count for each category is the number of items in the result set that belong to each defined set of collections.

Category values based on numerical range

A facet that has category values sourced from documents whose metadata value lies within a numerical range has a 1:1 relationship between each category and the number of results returned that belong to each defined range.

The category label is determined by the label assigned when creating the facet.

The count for each category is the number of items in the result set that are in the each of the pre-defined ranges.

The following content and configuration must be performed before a numerical range facet can be created:

  • Documents must include a metadata or XML field containing a numeric value (e.g. <meta name="price" content="30.0">).

  • This field needs to be added to the collection’s metadata mappings as a number type metadata field.

  • The collection index must have been rebuilt since the metadata mappings were defined.

Once these prerequisites are met a numeric range facet can be created, with ranges defined for the category values.

Example

  • Create a numeric range facet called price. This requires a metadata field, price, containing numeric values to exist within the indexed content.

  • Add several ranges to capture the following price ranges:

    • under $10 corresponding to 0 <= price < 10

    • $10-50 corresponding to 10 <= price < 50

    • $50-100 corresponding to 50 <= price < 100

    • $100+ corresponding to 100 <= price < 999999999

Ranges do need to be bounded on both sides, so you are unable to have a $100+ label without a defined upper bound. We suggest using a number larger than anything that is reasonably expected to appear in the content as the higher end of the range.

Category counts

The counts displayed for category values are estimates that are calculated based on the result set. Because of this the accuracy will reduce as the search index becomes larger. The numbers may also change when a facet is selected as the estimates are re-calculated every time the result set is produced.

Sorting category values

Facet category values can be sorted by a number of different attributes:

  • count: the category values are sorted by the category count, either largest to smallest, or smallest to largest.

  • label: the category values are sorted by the label, either alphabetically (A-Z) or reverse alphabetically (Z-A).

  • numeric label: the category values are sorted by the label, but with numbers interpreted numerically. e.g. a numeric label sort would sort as follows: 1, 10, 11, 100, compared with a label sort which would sort: 1, 10, 100, 11.

  • date: the category values are sorted by date, either most recent to oldest, or oldest to most recent.

  • selected values first: selected category values are placed above unselected category values.

  • configuration order: for facet types where the individual category values are defined, the order in which they appear in the configuration will be the order that is used to display the facets. The order can be changed by dragging the items around in the configuration.

  • custom sort logic: custom sort logic, implemented faceted navigation custom sort plugin, is used to sort the category values. Can be used to apply custom sort ordering to metadata based facets.

Renaming category values

Facet categories can be renamed by enabling the rename faceted categories plugin and setting some configuration values in your results page configuration.

Blacklisting and whitelisting category values

Two results page configuration options can be used to restrict the category values that can be displayed within a facet.

  • faceted_navigation.black_list: category values listed will be removed from the facet if they are returned in the list of facets.

  • faceted_navigation.white_list: only the category values listed will be displayed if they are returned in the list of facets. Other category values are removed.