Interface IFacetSearchRequest

A Search API facet search request.

Index

Properties

Optional basePath

basePath: string[]

The base path shared by all values for the facet.

Note: This parameter has no effect unless the facet type is hierarchical.

Optional captions

captions: Record<string, string>

A dictionary that maps index field values to facet value display names.

Example

{"acme_productA": "ACME Product A", "acme_productB": "ACME Product B"}

Optional delimitingCharacter

delimitingCharacter: string

The character to use to split field values into a hierarchical sequence.

Example:

For a multi-value field containing the following values:

c; c>folder2; c>folder2>folder3;

The delimiting character is >.

For a hierarchical field containing the following values:

c;folder2;folder3;

The delimiting character is ;.

Default: ;

field

field: string

The name of the field against which to execute the facet search request.

filterFacetCount

filterFacetCount: boolean

Whether to exclude folded result parents when estimating result counts for facet values.

Note: The target folding field must be a facet field with the Use cache for nested queries options enabled (see Add or Edit a Field).

See also the Folding and FoldingForThread components.

Default: true.

Available since

March 2020 Release (v2.8521)

Optional ignorePaths

ignorePaths: String[][]

A list of paths to filter out from the hierarchical facet search results.

Example: [["Electronics", "Entertainment", "Gaming Consoles"],["Appliances", "Kitchen"]]

Optional ignoreValues

ignoreValues: String[]

A list of index field values to filter out from the facet search results.

Example: ["blue", "green"]

Optional numberOfValues

numberOfValues: number

The maximum number of facet values to fetch.

Default (Search API): 10

Optional query

query: string

The string to match.

Typically, the text entered by the end-user in the facet search box, to which one or more wildcard characters (*) may be added.

Example: "*oran*"

Optional searchContext

searchContext: IQuery

The query parameters representing the current state of the search interface.

See the query documentation.

Optional type

The kind of facet values against which the search request is being made.

Default: specific

Hierarchy

  • IFacetSearchRequest