DateFacetSetActions

The date facet set action creators.

Loader Function

loadDateFacetSetActions

Loads the dateFacetSet reducer and returns possible action creators.

Parameters

  • engine: SearchEngine

    The headless engine.

Returns DateFacetSetActionCreators: The date facet set action creators.

DateFacetSetActionCreators

deselectAllDateFacetValues

Deselects all values of a date facet.

Parameters

  • facetId: string

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

Returns PayloadAction<string>: A dispatchable action.

registerDateFacet

Registers a date facet.

Parameters

Returns PayloadAction<RegisterDateFacetActionCreatorPayload>: A dispatchable action.

toggleSelectDateFacetValue

Toggles a date facet value.

Parameters

Returns PayloadAction<ToggleSelectDateFacetValueActionCreatorPayload>: A dispatchable action.

updateDateFacetSortCriterion

Updates the sort criterion of a date facet.

Parameters

Returns PayloadAction<UpdateDateFacetSortCriterionActionCreatorPayload>: A dispatchable action.

updateDateFacetValues

Updates date facet values.

Parameters

Returns PayloadAction<UpdateDateFacetValuesActionCreatorPayload>: A dispatchable action.

DateFacetValue

Properties

  • end: string

    The ending value for the date range, formatted as YYYY/MM/DD@HH:mm:ss or the Relative date format "period-amount-unit"

  • 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: string

    The starting value for the date range, formatted as YYYY/MM/DD@HH:mm:ss or the Relative date format "period-amount-unit"

  • state: 'idle' | 'selected'

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

DateRangeRequest

Properties

  • end: string

    The ending value for the date range, formatted as YYYY/MM/DD@HH:mm:ss or the Relative Date format "period-amount-unit".

  • endInclusive: boolean

    Whether to include the end value in the range.

  • start: string

    The starting value for the date range, formatted as YYYY/MM/DD@HH:mm:ss or the Relative Date format "period-amount-unit".

  • state: 'idle' | 'selected'

    The current facet value state.

RegisterDateFacetActionCreatorPayload

Properties

  • facetId: string

    A unique identifier for the 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?: DateRangeRequest[]

    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

ToggleSelectDateFacetValueActionCreatorPayload

Properties

  • facetId: string

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

  • selection: DateFacetValue

    The target date facet value.

UpdateDateFacetSortCriterionActionCreatorPayload

Properties

  • criterion: 'ascending' | 'descending'

    The target criterion.

  • facetId: string

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

UpdateDateFacetValuesActionCreatorPayload

Properties

  • facetId: string

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

  • values: DateFacetValue[]

    The date facet values.

What's Next for Me?