- Interfaces
FacetTypeOptions
Version: 0.6
| Type | Interface |
| Import path | @sitecore-cloudsdk/search/server |
The type object of a facet object. Settings for an individual facet.
Signature
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. The text the site visitor enters in the search field to perform a search. Use keyphrase to filter facet values.Useful when you have many facet values for a facet type and cannot display all the values at once. For example, you can add a search box within the facet type and pass the text that the site visitor enters as the keyphrase.The response contains facets that match the keyphrase exactly, or facets whose prefixes match the keyphrase. You can only use this key with term facets or dynamic attributes based on term facets. You cannot use this key if you use the after key.For example, the "dev" keyphrase returns the "Developer" facet value.Minimum length: 1. Maximum length: 100. | "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!