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, isCountingProductsFilteredFacetExpression<T> onlyTerm(V value)
FacetSearchModelonlyTerm in interface FacetSearchModel<T,V>value - the value from which to obtain the facetFilteredFacetExpression<T> onlyTerm(Iterable<V> values)
FacetSearchModelonlyTerm in interface FacetSearchModel<T,V>values - the values from which to obtain the facetsFilteredFacetExpression<T> onlyTermAsString(Iterable<String> values)
FacetSearchModelonlyTermAsString in interface FacetSearchModel<T,V>values - the values from which to obtain the facetsTermFacetSearchModel<T,V> withAlias(String alias)
FacetSearchModelwithAlias in interface FacetSearchModel<T,V>alias - the identifier to use for the facetTermFacetSearchModel<T,V> withCountingProducts(Boolean isCountingProducts)
FacetSearchModelwithCountingProducts 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