THIS IS ARCHIVED DOCUMENTATION

QuerySummary (Insight Engine) (Deprecated)

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: () => void

    A 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: number

    The duration, in milliseconds, that the last query took to execute.

  • durationInSeconds: number

    The duration, in seconds, that the last query took to execute.

  • firstResult: number

    The 1-based index of the first search result returned for the current page.

  • hasDuration: boolean

    Determines if a query execution time is available.

  • hasQuery: boolean

    Determines if non-empty query has been executed.

  • lastResult: number

    The 1-based index of the last search result returned for the current page.

  • query: string

    The query that was last executed (the content of the searchbox).

  • total: number

    The total count of results available.

  • firstSearchExecuted: boolean

    Determines if a first search has been executed.

  • hasError: boolean

    true if there’s an error for the last executed query and false otherwise.

  • hasResults: boolean

    Determines if there are results available for the last executed query.

  • isLoading: boolean

    Determines if a search is in progress.

Initialize

buildQuerySummary

Creates an insight QuerySummary controller instance.

Parameters

  • engine: InsightEngine

    The insight engine.

Returns QuerySummary

Unsubscribe

Call signatures

  • (): void