T
- type of the resourceV
- type of the valuepublic interface TermFacetSearchModel<T,V> extends FacetSearchModel<T,V>
Modifier and Type | Method and Description |
---|---|
static <T,V> TermFacetSearchModel<T,V> |
of(String attributePath,
Function<V,String> typeSerializer)
Creates an instance of the search model to generate term facet expressions.
|
FilteredFacetExpression<T> |
onlyTerm(Iterable<V> values)
Generates an expression to obtain the facets of the attribute for only the given values.
|
FilteredFacetExpression<T> |
onlyTerm(V value)
Generates an expression to obtain the facet of the attribute for only the given value.
|
FilteredFacetExpression<T> |
onlyTermAsString(Iterable<String> values)
Generates an expression to obtain the facets of the attribute for only the given values.
|
TermFacetSearchModel<T,V> |
withAlias(String alias)
Allows to set an alias to identify the facet.
|
TermFacetSearchModel<T,V> |
withCountingProducts(Boolean isCountingProducts)
Allows to enable/disable the counting of products.
|
allTerms, getAlias, getSearchModel, isCountingProducts
FilteredFacetExpression<T> onlyTerm(V value)
FacetSearchModel
onlyTerm
in interface FacetSearchModel<T,V>
value
- the value from which to obtain the facetFilteredFacetExpression<T> onlyTerm(Iterable<V> values)
FacetSearchModel
onlyTerm
in interface FacetSearchModel<T,V>
values
- the values from which to obtain the facetsFilteredFacetExpression<T> onlyTermAsString(Iterable<String> values)
FacetSearchModel
onlyTermAsString
in interface FacetSearchModel<T,V>
values
- the values from which to obtain the facetsTermFacetSearchModel<T,V> withAlias(String alias)
FacetSearchModel
withAlias
in interface FacetSearchModel<T,V>
alias
- the identifier to use for the facetTermFacetSearchModel<T,V> withCountingProducts(Boolean isCountingProducts)
FacetSearchModel
withCountingProducts
in interface FacetSearchModel<T,V>
isCountingProducts
- whether to count products or notstatic <T,V> TermFacetSearchModel<T,V> of(String attributePath, Function<V,String> typeSerializer)
T
- type of the resourceV
- type of the valueattributePath
- the path of the attribute as expected by Composable Commerce (e.g. "variants.attributes.color.key")typeSerializer
- the function to convert the provided value to a string accepted by Composable Commerce