Class FacetedSearch

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

Deprecated

use FilteredSearch, a generalization of FacetedSearch

Hierarchy

Constructors

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

  • Add a filter to the FilteredSearch object.

    Parameters

    • obj: Query | Filter

      the Filter to be added or a Query object, from which a SimpleFilter or ParameterizedFilter will be deduced

    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 to get the search results. Will return searchQuery as passed to the constructor unless a emptyParameterQuery was also passed and all parameters for searchQuery are empty.

    Returns Query

  • Get the Query objects to retrieve the facet options. When using multiple facets, the facetEndpoint parameter is required.

    Parameters

    • facetEndpoint: string
    • excludeModifier: boolean = false

    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