FacetManager (Insight Engine) (Deprecated)
FacetManager (Insight Engine) (Deprecated)
|
|
Headless v1 has been deprecated. We recommend using the latest version of the Coveo Headless library. |
The FacetManager controller helps reorder facets to match the most recent search response.
Methods
sort
Sorts the facets to match the order in the most recent search response.
Parameters
-
facets:
FacetManagerPayload<T>[]An array of facet payloads to sort.
Returns FacetManagerPayload<T>[]: A sorted array.
subscribe
Adds a callback that’s invoked on state change.
Parameters
-
listener:
() => voidA callback that’s invoked on state change.
Returns Unsubscribe: A function to remove the listener.
Attributes
state
The state of the CoreFacetManager controller.
Properties
-
facetIds:
string[]The facet ids sorted in the same order as the latest response.
Initialize
buildFacetManager
Creates an insight FacetManager instance.
Parameters
-
engine:
InsightEngineThe insight engine.
Returns FacetManager
Related types
FacetManagerPayload<T>
Properties
-
facetId:
stringA unique string identifying a facet.
-
payload:
TThe payload to associate with the facetId. This can be anything, for example, a DOM element, JSX, a string.
Unsubscribe
Call signatures
-
(): void