@coveo/headless
    Preparing search index...

    Interface NumericFacetOptions

    The options defining a NumericFacet.

    interface NumericFacetOptions {
        currentValues?: NumericRangeRequest[];
        facetId?: string;
        field: string;
        filterFacetCount?: boolean;
        generateAutomaticRanges: boolean;
        injectionDepth?: number;
        numberOfValues?: number;
        rangeAlgorithm?: RangeFacetRangeAlgorithm;
        resultsMustMatch?: FacetResultsMustMatch;
        sortCriteria?: RangeFacetSortCriterion;
        tabs?: { excluded?: string[]; included?: string[] };
    }
    Index

    Properties

    currentValues?: NumericRangeRequest[]

    The values displayed by the facet in the search interface at the moment of the request.

    If generateAutomaticRanges is false, values must be specified. If generateAutomaticRanges is true, automatic ranges are going to be appended after the specified values.

    []

    facetId?: string

    A unique identifier for the controller. By default, a unique random identifier is generated.

    field: string

    The field whose values you want to display in the facet.

    filterFacetCount?: boolean

    Whether to exclude folded result parents when estimating the result count for each facet value.

    Note: Resulting count is only an estimation, in some cases this value could be incorrect.

    true

    generateAutomaticRanges: boolean

    Whether the index should automatically create range values.

    Tip: If you set this parameter to true, you should ensure that the 'Use cache for numeric queries' option is enabled for this facet's field in your index in order to speed up automatic range evaluation.

    injectionDepth?: number

    The maximum number of results to scan in the index to ensure that the facet lists all potential facet values.

    Note: A high injectionDepth may negatively impact the facet request performance.

    Minimum: 0

    1000

    numberOfValues?: number

    The number of values to request for this facet. Also determines the number of additional values to request each time this facet is expanded, and the number of values to display when this facet is collapsed.

    Minimum: 1

    8

    rangeAlgorithm?: RangeFacetRangeAlgorithm

    The algorithm that's used for generating the ranges of this facet when they aren't manually defined. The default value of "even" generates equally sized facet ranges across all of the results. The value "equiprobable" generates facet ranges which vary in size but have a more balanced number of results within each range.

    even

    resultsMustMatch?: FacetResultsMustMatch

    The criterion to use for specifying how results must match the selected facet values.

    atLeastOneValue

    The sort criterion to apply to the returned facet values.

    ascending

    tabs?: { excluded?: string[]; included?: string[] }

    The tabs on which the facet should be enabled or disabled.