IFacet
Definition of a Facet shown in the Gallery UI.
If a field
is specified, the Facet will be "dynamic" in that
it will request aggregations for the field and use the returned
values to create the FacetOptions.
Facet
contains and array if FacetOptions
. When selected
in the UI, a FilterGroup is constructed from the Facet.operation
and the Filters
are from the selected FacetOptions
.
Properties
Property | Type | Notes |
---|---|---|
Optional | boolean | |
Optional | string | |
Optional | number |
limit of aggregates returned. Max 200 |
Optional | "map" | "single-select" | "multi-select" | "date-range" | "histogram" |
Display for this facet. Not all facets will be compatible with all displays |
Optional | string |
field to generate the facet from |
Optional | string |
Unique key, used for query params and telemetry |
Optional | string |
Translated label for the facet |
Optional | "OR" | "AND" |
Operation is passed into the FilterGroup that is constructed when the Facet is serialized. Implemetations should default to "OR" if not specified |
Optional | number |
Number of facet options to show by default. Only applies to |
Optional | IFacetOption[] |
Individual options for this Facet |
Optional | "count" | "label" |
Specifies how to order the facet options. Only applies to
|
Optional | number | |
Optional | "open" | "closed" |
State of the Facet |
Optional | "single-select" | "multi-select" | "date-range" | "histogram" |
Interface defined in common/src/search/types/IFacet.ts:14