QuerySummary (Insight Engine)
QuerySummary (Insight Engine)
|
|
Note
This component was introduced in version |
The QuerySummary headless controller offers a high-level interface for designing a common query summary UI controller.
Methods
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 relevant to the CoreQuerySummary controller.
Properties
-
durationInMilliseconds:
numberThe duration, in milliseconds, that the last query took to execute.
-
durationInSeconds:
numberThe duration, in seconds, that the last query took to execute.
-
firstResult:
numberThe 1-based index of the first search result returned for the current page.
-
hasDuration:
booleanDetermines if a query execution time is available.
-
hasQuery:
booleanDetermines if non-empty query has been executed.
-
lastResult:
numberThe 1-based index of the last search result returned for the current page.
-
query:
stringThe query that was last executed (the content of the searchbox).
-
total:
numberThe total count of results available.
-
firstSearchExecuted:
booleanDetermines if a first search has been executed.
-
hasError:
booleantrueif there is an error for the last executed query andfalseotherwise. -
hasResults:
booleanDetermines if there are results available for the last executed query.
-
isLoading:
booleanDetermines if a search is in progress.
Initialize
buildQuerySummary
Creates an insight QuerySummary controller instance.
Parameters
-
engine:
InsightEngineThe insight engine.
Returns QuerySummary
Related types
Unsubscribe
Call signatures
-
(): void;