CategoryFacetSetActions

This is for:

Developer

The category facet set action creators.

Loader Function

loadCategoryFacetSetActions

Loads the categoryFacetSet reducer and returns possible action creators.

Parameters

  • engine: SearchEngine

    The headless engine.

Returns CategoryFacetSetActionCreators: The category facet set action creators.

CategoryFacetSetActionCreators

deselectAllCategoryFacetValues

Deselects all values of a category facet.

Parameters

  • facetId: string

    The unique identifier of the facet (for example, "1").

Returns PayloadAction<string>: A dispatchable action.

registerCategoryFacet

Registers a category facet in the category facet set.

Parameters

Returns PayloadAction<RegisterCategoryFacetActionCreatorPayload>: A dispatchable action.

toggleSelectCategoryFacetValue

Toggles a category facet value.

Parameters

Returns PayloadAction<ToggleSelectCategoryFacetValueActionCreatorPayload>: A dispatchable action.

updateCategoryFacetBasePath

Updates the base path for the category facet.

Parameters

Returns PayloadAction<UpdateCategoryFacetBasePathActionCreatorPayload>: A dispatchable action.

updateCategoryFacetNumberOfValues

Updates the number of values of a category facet.

Parameters

Returns PayloadAction<UpdateCategoryFacetNumberOfValuesActionCreatorPayload>: A dispatchable action.

updateCategoryFacetSortCriterion

Updates the sort criterion for the category facet.

Parameters

Returns PayloadAction<UpdateCategoryFacetSortCriterionActionCreatorPayload>: A dispatchable action.

updateFacetAutoSelection

Updates the preventAutoSelect flag of all facets.

Parameters

Returns PayloadAction<UpdateFacetAutoSelectionActionCreatorPayload>: A dispatchable action.

CategoryFacetValue

Properties

  • children: CategoryFacetValue[]

    The children of this facet value.

  • isLeafValue: boolean

    When the hierarchical value has no children, this property is true.

  • moreValuesAvailable: boolean

    Whether more facet values are available.

  • numberOfResults: number

    The number of results that match the facet value.

  • path: string[]

    The hierarchical path to the facet value.

  • state: 'idle' | 'selected' | 'excluded'

    Whether a facet value is filtering results (selected) or not (idle).

  • value: string

    The facet value.

RegisterCategoryFacetActionCreatorPayload

Properties

  • facetId: string

    A unique identifier for the facet.

  • field: string

    The field whose values you want to display in the facet.

  • basePath?: string[]

    The base path shared by all values for the facet.

    Default: []

  • delimitingCharacter?: string

    The character that specifies the hierarchical dependency.

    Default: ;

  • filterByBasePath?: boolean

    Whether to use basePath as a filter for the results.

    Default: true

  • filterFacetCount?: boolean

    Whether to exclude the parents of folded results when estimating the result count for each facet value.

    Default: true

  • injectionDepth?: number

    The maximum number of results to scan in the index to ensure that the facet lists all potential facet values.

    Note: A high injectionDepth may negatively impact the facet request performance.

    Minimum: 0

    Default: 1000

  • numberOfValues?: number

    The number of values to request for this facet. Also determines the number of additional values to request each time this facet is expanded, and the number of values to display when this facet is collapsed.

    Minimum: 1

    Default: 5

  • sortCriteria?: 'alphanumeric' | 'occurrences'

    The criterion to use for sorting returned facet values.

    Default: occurrences

ToggleSelectCategoryFacetValueActionCreatorPayload

Properties

  • facetId: string

    The unique identifier of the facet (for example, "1").

  • retrieveCount: number

    The number of child values to display.

  • selection: CategoryFacetValue

    The target category facet value.

UpdateCategoryFacetBasePathActionCreatorPayload

Properties

  • basePath: string[]

    The base path shared by all values for the facet.

  • facetId: string

    The unique identifier of the facet (for example, "1").

UpdateCategoryFacetNumberOfValuesActionCreatorPayload

Properties

  • facetId: string

    The unique identifier of the facet (for example, "1").

  • numberOfValues: number

    The new number of facet values (for example, 10).

UpdateCategoryFacetSortCriterionActionCreatorPayload

Properties

  • criterion: 'alphanumeric' | 'occurrences'

    The criterion by which to sort the facet.

  • facetId: string

    The unique identifier of the facet (for example, "1").

UpdateFacetAutoSelectionActionCreatorPayload

Properties

  • allow: boolean

    Whether to allow or prevent automatic selection in all facets.