Class FacetedSearch

Associate Query objects with each other in a faceted search setup.

Deprecated

use FilteredSearch, a generalization of FacetedSearch

Hierarchy

Constructors

  • Parameters

    • searchQuery: Query

      Query object for the search results that will serve as the base for this facet. The searchQuery is used to fetch the options of the facet and will be filtered once one or more facet options are selected. The searchQuery must have at least one parameter.

    • Optional emptyParameterQuery: Query

      emptyParameterQuery is used instead of searchQuery when the searchQuery parameters are all empty. If no emptyParameterQuery is passed, searchQuery is fetched with empty parameters.

    • Optional modifiers: Query[]

      Optional list of allowed modifiers. If not given, all modifiers will be allowed.

    Returns FacetedSearch

Properties

_filters: Filter[] = []

Accessors

Methods

  • Add a facet to the FilteredSearch object.

    Parameters

    • endpoint: string
    • type: FacetType = FacetType.single
    • resetOnQueryChange: boolean = true
    • filterEndpointPostfix: string = ':FILTER'
    • filterEndpointParameterName: string = 'value'

    Returns void

  • Parameters

    • filterEndpoint: string
    • resetOnQueryChange: boolean = true
    • filterParameterName: string = 'value'

    Returns void

  • Clear the selection for a given facet.

    Parameters

    • Optional facetEndpoint: string

    Returns void

  • Get the Query objects to retrieve the facet options.

    Parameters

    • facetEndpoint: string

      name of the facet endpoint to fetch options for

    • excludeModifier: boolean = false

      will skip applying the active modifier

    • includeSelf: boolean = false

      keep the active facet filter for which options should be fetched in the query stack. Use when requesting RequestType.Options

    Returns Query[]

  • Set the selected options for a given facet.

    Parameters

    • facetEndpoint: string
    • selection: string | string[]

    Returns void

  • Set the selected options for a given filter or facet.

    Parameters

    • endpoint: string
    • selection: undefined | null | string | number | (string | number)[] | (string | number)[][]

    Returns void

  • Overwrite the entire state with the values in the passed Query stack.

    Parameters

    • results: Query[]

      typically retrieved from a URL query parameter and then parsed with parseQueries

    Returns void

Generated using TypeDoc