NumericFacetSetActions (Insight Engine)

This is for:

Developer

The numeric facet action creators.

Loader Function

loadNumericFacetSetActions

Loads the numericFacetSet reducer and returns possible action creators.

Parameters

  • engine: CoreEngine

    The headless engine.

Returns NumericFacetSetActionCreators: The numeric facet action creators.

NumericFacetSetActionCreators

deselectAllNumericFacetValues

Deselects all values of a numeric facet.

Parameters

  • facetId: string

    The unique identifier of the facet (e.g., "1").

Returns PayloadAction<string>: A dispatchable action.

registerNumericFacet

Registers a numeric facet.

Parameters

Returns PayloadAction<RegisterNumericFacetActionCreatorPayload>: A dispatchable action.

toggleExcludeNumericFacetValue

Toggles exclusion of a numeric facet value.

Parameters

Returns PayloadAction<ToggleSelectNumericFacetValueActionCreatorPayload>: A dispatchable action.

toggleSelectNumericFacetValue

Toggles a numeric facet value.

Parameters

Returns PayloadAction<ToggleSelectNumericFacetValueActionCreatorPayload>: A dispatchable action.

updateNumericFacetSortCriterion

Updates the sort criterion of a numeric facet.

Parameters

Returns PayloadAction<UpdateNumericFacetSortCriterionActionCreatorPayload>: A dispatchable action.

updateNumericFacetValues

Updates numeric facet values.

Parameters

Returns PayloadAction<UpdateNumericFacetValuesActionCreatorPayload>: A dispatchable action.

NumericFacetValue

Properties

  • end: number

    The ending value for the numeric range.

  • endInclusive: boolean

    Whether or not the end value is included in the range.

  • numberOfResults: number

    The number of results that have the facet value.

  • start: number

    The starting value for the numeric range.

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

    The state of the facet value, indicating whether it is filtering results (selected) or not (idle).

NumericRangeRequest

Properties

  • end: number

    The end value of the range.

  • endInclusive: boolean

    Whether to include the end value in the range.

  • start: number

    The start value of the range.

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

    The current facet value state.

RegisterNumericFacetActionCreatorPayload

Properties

  • facetId: string

    A unique identifier for the numeric facet.

  • field: string

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

  • generateAutomaticRanges: boolean

    Whether the index should automatically create range values.

    Tip: If you set this parameter to true, you should ensure that the 'Use cache for numeric queries' option is enabled for this facet’s field in your index in order to speed up automatic range evaluation.

  • currentValues?: NumericRangeRequest[]

    The values displayed by the facet in the search interface at the moment of the request.

    If generateAutomaticRanges is false, values must be specified. If generateAutomaticRanges is true, automatic ranges are going to be appended after the specified values.

    Default: []

  • filterFacetCount?: boolean

    Whether to exclude folded result parents 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: 8

  • rangeAlgorithm?: 'even' | 'equiprobable'

    The range algorithm to apply to automatically generated ranges for the range facet.

    Default: even

  • sortCriteria?: 'ascending' | 'descending'

    The sort criterion to apply to the returned facet values.

    Default: ascending

ToggleSelectNumericFacetValueActionCreatorPayload

Properties

  • facetId: string

    The unique identifier of the facet (e.g., "1").

  • selection: NumericFacetValue

    The target numeric facet value.

UpdateNumericFacetSortCriterionActionCreatorPayload

Properties

  • criterion: 'ascending' | 'descending'

    The target criterion.

  • facetId: string

    The unique identifier of the facet (e.g., "1").

UpdateNumericFacetValuesActionCreatorPayload

Properties

  • facetId: string

    The unique identifier of the facet (e.g., "1").

  • values: NumericFacetValue[]

    The numeric facet values.