io.sphere.sdk.search.FacetExpression Maven / Gradle / Ivy
package io.sphere.sdk.search;
/**
* Facets calculate statistical counts to aid in faceted navigation.
* @param Type of the resource for the faceted search
*/
public interface FacetExpression {
/**
* returns a facet expression.
* Example: variants.attributes.color as myColor
* @return String with unescaped sphere facet expression
*/
String toSearchExpression();
/**
* Generates the attribute path for the facet.
* Example: variants.attributes.color
* @return the path for the attribute to be faceted
*/
String attributePath();
static FacetExpression of(final String sphereFacetExpression) {
return new SimpleFacetExpression<>(sphereFacetExpression);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy