The Facet interface
In Sitecore Search, content can be displayed in facets. A facet is a dynamic search interface component that creates categories based on attribute values. With facets, users can easily filter search results using the categories.
Facet interface
|
Name |
Type |
Description |
|---|---|---|
|
|
boolean |
Requests all facet types. |
|
|
number |
Maximum number of facet types. |
|
|
FacetSort |
Sorting order requested. |
|
|
Array<FacetType> |
List of facet types. |
FacetSort interface
|
Name |
Type |
Description |
|---|---|---|
|
|
string |
Alphabetically or numerically sort type. text or count. |
|
|
string |
Ascending or descending sort. asc or desc. |
FacetType interface
|
Name |
Type |
Description |
|---|---|---|
|
|
string |
Name of previous facet type in list.. |
|
|
Array<string> |
Names of facet types to exclude. |
|
|
FacetTypeFilter |
|
|
|
Array<FacetTypeFilteringOptions> |
List of FacetTypeFilteringOptions enumerator values.
|
|
|
string |
Phrase to search. |
|
|
number |
Maximum number of facet types to return. |
|
|
number |
Minimum number of facet types to return. |
|
|
string |
Name of facet type. |
|
|
Array<Sort> |
List of sorting options for the facet type. |
Sort interface
|
Name |
Type |
Description |
|---|---|---|
|
|
boolean |
Flag to request a list of all sort options in the response. true or false |
|
|
SortItem |
Object describing how items are sorted. |
SortItem interface
|
Name |
Type |
Description |
|---|---|---|
|
|
string |
Alphabetically or numerically sort type. text or count. |
|
|
string |
Ascending or descending sort. asc or desc. |
Unless indicated otherwise, all values are optional.
Other related methods
The following code block lists the various methods related to facets and is accessible through the WidgetRequest object. After the installation of the JS Data package into your project, these methods and their documentation are available in your IDE.