NumericFacetSetActions (Insight Engine)
NumericFacetSetActions (Insight Engine)
|
|
Note
This component was introduced in version |
The numeric facet action creators.
See Dispatch Actions.
Loader Function
loadNumericFacetSetActions
Loads the numericFacetSet reducer and returns possible action creators.
Parameters
-
engine:
CoreEngineThe headless engine.
Returns NumericFacetSetActionCreators: The numeric facet action creators.
NumericFacetSetActionCreators
deselectAllNumericFacetValues
Deselects all values of a numeric facet.
Parameters
-
facetId:
stringThe unique identifier of the facet (for example, "1").
Returns PayloadAction<string>: A dispatchable action.
registerNumericFacet
Registers a numeric facet.
Parameters
-
payload:
RegisterNumericFacetActionCreatorPayloadThe action creator payload.
Returns PayloadAction<RegisterNumericFacetActionCreatorPayload>: A dispatchable action.
toggleExcludeNumericFacetValue
Toggles exclusion of a numeric facet value.
Parameters
-
payload:
ToggleSelectNumericFacetValueActionCreatorPayloadThe action creator payload.
Returns PayloadAction<ToggleSelectNumericFacetValueActionCreatorPayload>: A dispatchable action.
toggleSelectNumericFacetValue
Toggles a numeric facet value.
Parameters
-
payload:
ToggleSelectNumericFacetValueActionCreatorPayloadThe action creator payload.
Returns PayloadAction<ToggleSelectNumericFacetValueActionCreatorPayload>: A dispatchable action.
updateNumericFacetSortCriterion
Updates the sort criterion of a numeric facet.
Parameters
-
payload:
UpdateNumericFacetSortCriterionActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateNumericFacetSortCriterionActionCreatorPayload>: A dispatchable action.
updateNumericFacetValues
Updates numeric facet values.
Parameters
-
payload:
UpdateNumericFacetValuesActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateNumericFacetValuesActionCreatorPayload>: A dispatchable action.
Related types
NumericFacetValue
Properties
-
end:
numberThe ending value for the numeric range.
-
endInclusive:
booleanWhether or not the end value is included in the range.
-
numberOfResults:
numberThe number of results that have the facet value.
-
start:
numberThe 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:
numberThe end value of the range.
-
endInclusive:
booleanWhether to include the
endvalue in the range. -
start:
numberThe start value of the range.
-
state:
'idle' | 'selected' | 'excluded'The current facet value state.
RegisterNumericFacetActionCreatorPayload
Properties
-
facetId:
stringA unique identifier for the numeric 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?:
NumericRangeRequest[]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 injectionDepth may 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
ToggleSelectNumericFacetValueActionCreatorPayload
Properties
-
facetId:
stringThe unique identifier of the facet (for example,
"1"). -
selection:
NumericFacetValueThe target numeric facet value.
UpdateNumericFacetSortCriterionActionCreatorPayload
Properties
-
criterion:
'ascending' | 'descending'The target criterion.
-
facetId:
stringThe unique identifier of the facet (for example,
"1").
UpdateNumericFacetValuesActionCreatorPayload
Properties
-
facetId:
stringThe unique identifier of the facet (for example,
"1"). -
values:
NumericFacetValue[]The numeric facet values.