CategoryFacetSetActions (Search Engine)
CategoryFacetSetActions (Search Engine)
|
|
Note
This component was introduced in version |
The category facet set action creators.
See Dispatch Actions.
Loader Function
loadCategoryFacetSetActions
Loads the categoryFacetSet reducer and returns possible action creators.
Parameters
-
engine:
SearchEngineThe headless engine.
Returns CategoryFacetSetActionCreators: The category facet set action creators.
CategoryFacetSetActionCreators
deselectAllCategoryFacetValues
Deselects all values of a category facet.
Parameters
-
facetId:
stringThe 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
-
payload:
RegisterCategoryFacetActionCreatorPayloadThe action creator payload.
Returns PayloadAction<RegisterCategoryFacetActionCreatorPayload>: A dispatchable action.
toggleSelectCategoryFacetValue
Toggles a category facet value.
Parameters
-
payload:
ToggleSelectCategoryFacetValueActionCreatorPayloadThe action creator payload.
Returns PayloadAction<ToggleSelectCategoryFacetValueActionCreatorPayload>: A dispatchable action.
updateCategoryFacetBasePath
Updates the base path for the category facet.
Parameters
-
payload:
UpdateCategoryFacetBasePathActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateCategoryFacetBasePathActionCreatorPayload>: A dispatchable action.
updateCategoryFacetNumberOfValues
Updates the number of values of a category facet.
Parameters
-
payload:
UpdateCategoryFacetNumberOfValuesActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateCategoryFacetNumberOfValuesActionCreatorPayload>: A dispatchable action.
updateCategoryFacetSortCriterion
Updates the sort criterion for the category facet.
Parameters
-
payload:
UpdateCategoryFacetSortCriterionActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateCategoryFacetSortCriterionActionCreatorPayload>: A dispatchable action.
updateFacetAutoSelection
Updates the preventAutoSelect flag of all facets.
Parameters
-
payload:
UpdateFacetAutoSelectionActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateFacetAutoSelectionActionCreatorPayload>: A dispatchable action.
Related types
CategoryFacetValue
Properties
-
children:
CategoryFacetValue[]The children of this facet value.
-
isLeafValue:
booleanWhen the hierarchical value has no children, this property is true.
-
moreValuesAvailable:
booleanWhether more facet values are available.
-
numberOfResults:
numberThe 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:
stringThe facet value.
RegisterCategoryFacetActionCreatorPayload
Properties
-
facetId:
stringA unique identifier for the facet.
-
field:
stringThe field whose values you want to display in the facet.
-
basePath?:
string[]The base path shared by all values for the facet.
Default:
[] -
delimitingCharacter?:
stringThe character that specifies the hierarchical dependency.
Default:
; -
filterByBasePath?:
booleanWhether to use basePath as a filter for the results.
Default:
true -
filterFacetCount?:
booleanWhether to exclude the parents of folded results 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:
5 -
sortCriteria?:
'alphanumeric' | 'occurrences'The criterion to use for sorting returned facet values.
Default:
occurrences
ToggleSelectCategoryFacetValueActionCreatorPayload
Properties
-
facetId:
stringThe unique identifier of the facet (for example,
"1"). -
retrieveCount:
numberThe number of child values to display.
-
selection:
CategoryFacetValueThe target category facet value.
UpdateCategoryFacetBasePathActionCreatorPayload
Properties
-
basePath:
string[]The base path shared by all values for the facet.
-
facetId:
stringThe unique identifier of the facet (for example,
"1").
UpdateCategoryFacetNumberOfValuesActionCreatorPayload
Properties
-
facetId:
stringThe unique identifier of the facet (for example,
"1"). -
numberOfValues:
numberThe new number of facet values (for example,
10).
UpdateCategoryFacetSortCriterionActionCreatorPayload
Properties
-
criterion:
'alphanumeric' | 'occurrences'The criterion by which to sort the facet.
-
facetId:
stringThe unique identifier of the facet (for example,
"1").
UpdateFacetAutoSelectionActionCreatorPayload
Properties
-
allow:
booleanWhether to allow or prevent automatic selection in all facets.