1. @sitecore-cloudsdk/search/server

FacetTypeOptions

Version:

Type

Interface

Import path

@sitecore-cloudsdk/search/server

The type object of a facet object. Settings for an individual facet.

Signature

export interface FacetTypeOptions {
  name: string;
  exclude?: ArrayOfAtLeastOne<string>;
  max?: number;
  keyphrase?: string;
  minCount?: number;
  sort?: FacetSort;
  filter?: FacetTypeFilter;
  filteringOptions?: FilteringOptions;
}

Properties

Name

Type

Description

Value

name

string

Required.

The name of the individual facet. Configured in Sitecore Search.

The facet you specify here will be returned in the response even if facet.all is set to false.

"sizes_facet"

exclude

string[]

Optional.

A list of facet values to exclude from the response for this facet type.

Case-sensitive.

For example, if you specify "Small" and "Medium" in exclude, those facet values will not be included in the response.

Minimum length: 1.

[ "Small", "Medium" ]

max

integer

Optional.

The maximum number of facet values to retrieve for this facet type.

Overrides the facet.max value and the settings in Sitecore Search for this facet type.

We recommend that you request fewer than 50 facet values. If you request too many, you will see a lag in response times.

If unset, Sitecore Search returns maximum 10 facet values.

Minimum: 1.

Maximum: 100.

Default: 10.

10

keyphrase

string

Optional.

"dev"

minCount

integer

Optional.

The minimum number of search results a facet value must correspond to for the facet value to be included in the response.

Facet values that have fewer corresponding search results than specified in minCount will be excluded from the response.

For example, if minCount is 60, only facet values that have minimum 60 corresponding search results will be included in the response.

60

sort

FacetSort

Optional.

Sorting configuration for the facet values in the individual facets. For example, the ability to sort in descending alphabetical order.

N/A

filter

FacetTypeFilter

Optional.

Filter for facet values.

Used for getting search results from certain facet values only.

Case-sensitive.

If a facet value doesn't match any of the returned content, the facet value will be excluded from the response.

N/A

filteringOptions

FilteringOptions

Optional.

Options for filtering. Used for managing how other filtering affects this facet, and how filtering in this facet affects other facets.

"Dynamic OR"

If you have suggestions for improving this article, let us know!