DateFacetSetActions (Search Engine)
DateFacetSetActions (Search Engine)
|
|
Note
This component was introduced in version |
The date facet set action creators.
See Dispatch Actions.
Loader Function
loadDateFacetSetActions
Loads the dateFacetSet reducer and returns possible action creators.
Parameters
-
engine:
CoreEngineThe headless engine.
Returns DateFacetSetActionCreators: The date facet set action creators.
DateFacetSetActionCreators
deselectAllDateFacetValues
Deselects all values of a date facet.
Parameters
-
facetId:
stringThe unique identifier of the facet (for example,
"1").
Returns PayloadAction<string>: A dispatchable action.
registerDateFacet
Registers a date facet.
Parameters
-
payload:
RegisterDateFacetActionCreatorPayloadThe action creator payload.
Returns PayloadAction<RegisterDateFacetActionCreatorPayload>: A dispatchable action.
toggleExcludeDateFacetValue
Toggles exclusion of a date facet value
Parameters
-
payload:
ToggleSelectDateFacetValueActionCreatorPayloadThe action creator payload.
Returns PayloadAction<ToggleSelectDateFacetValueActionCreatorPayload>: A dispatchable action.
toggleSelectDateFacetValue
Toggles a date facet value.
Parameters
-
payload:
ToggleSelectDateFacetValueActionCreatorPayloadThe action creator payload.
Returns PayloadAction<ToggleSelectDateFacetValueActionCreatorPayload>: A dispatchable action.
updateDateFacetSortCriterion
Updates the sort criterion of a date facet.
Parameters
-
payload:
UpdateDateFacetSortCriterionActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateDateFacetSortCriterionActionCreatorPayload>: A dispatchable action.
updateDateFacetValues
Updates date facet values.
Parameters
-
payload:
UpdateDateFacetValuesActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateDateFacetValuesActionCreatorPayload>: A dispatchable action.
Related types
DateFacetValue
Properties
-
end:
stringThe ending value for the date range, formatted as
YYYY/MM/DD@HH:mm:ssor the Relative date format "period-amount-unit" -
endInclusive:
booleanWhether the end value is included in the range.
-
numberOfResults:
numberThe number of results that have the facet value.
-
start:
stringThe starting value for the date range, formatted as
YYYY/MM/DD@HH:mm:ssor the Relative date format "period-amount-unit" -
state:
'idle' | 'selected' | 'excluded'The state of the facet value, indicating whether it is filtering results (
selected) or not (idle).
DateRangeRequest
Properties
-
end:
stringThe ending value for the date range, formatted as
YYYY/MM/DD@HH:mm:ssor the Relative Date format "period-amount-unit". -
endInclusive:
booleanWhether to include the
endvalue in the range. -
start:
stringThe starting value for the date range, formatted as
YYYY/MM/DD@HH:mm:ssor the Relative Date format "period-amount-unit". -
state:
'idle' | 'selected' | 'excluded'The current facet value state.
RegisterDateFacetActionCreatorPayload
Properties
-
facetId:
stringA unique identifier for the facet.
-
field:
stringThe field whose values you want to display in the facet.
-
generateAutomaticRanges:
booleanWhether 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
generateAutomaticRangesis false, values must be specified. IfgenerateAutomaticRangesis true, automatic ranges are going to be appended after the specified values.Default:
[] -
filterFacetCount?:
booleanWhether to exclude folded result parents when estimating the result count for each facet value.
Default:
true -
injectionDepth?:
numberThe maximum number of results to scan in the index to ensure that the facet lists all potential facet values.
Note: A high
injectionDepthmay negatively impact the facet request performance.Minimum:
0Default:
1000 -
numberOfValues?:
numberThe 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:
1Default:
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:
stringThe unique identifier of the facet (for example,
"1"). -
selection:
DateFacetValueThe target date facet value.
UpdateDateFacetSortCriterionActionCreatorPayload
Properties
-
criterion:
'ascending' | 'descending'The target criterion.
-
facetId:
stringThe unique identifier of the facet (for example,
"1").
UpdateDateFacetValuesActionCreatorPayload
Properties
-
facetId:
stringThe unique identifier of the facet (for example,
"1"). -
values:
DateFacetValue[]The date facet values.