FacetManager (Insight Engine) (Deprecated)
FacetManager (Insight Engine) (Deprecated)
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:
() => void
A 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:
InsightEngine
The insight engine.
Returns FacetManager
Related Types
FacetManagerPayload<T>
Properties
-
facetId:
string
A unique string identifying a facet.
-
payload:
T
The payload to associate with the facetId. This can be anything, for example, a DOM element, JSX, a string.
Unsubscribe
Call signatures
-
(): void