Class ValueFacet

  • All Implemented Interfaces:
    Facet

    public class ValueFacet
    extends Object
    implements Facet
    Represents a request to facet based on a value
    • Constructor Detail

      • ValueFacet

        public ValueFacet()
      • ValueFacet

        public ValueFacet​(String fieldName)
    • Method Detail

      • getType

        public FacetType getType()
        Description copied from interface: Facet
        Type of facet
        Specified by:
        getType in interface Facet
        Returns:
        The facet type
      • getFieldName

        public String getFieldName()
        Description copied from interface: Facet
        The field from your schema upon which to apply your facet.
        Specified by:
        getFieldName in interface Facet
        Returns:
        The field name
      • getName

        public String getName()
        Name given to facet
        Specified by:
        getName in interface Facet
        Returns:
        the name
      • getSize

        public Integer getSize()
        How many facets would you like to return? Can be between 1 and 250 (or the value of the app_search.engine.total_facet_values_returned.limit configuration setting). 10 facets is the default.
        Returns:
        The number of facets to return
      • getSortField

        public FacetSortField getSortField()
        Sort field. Either count or value
        Returns:
        The sort field
      • getSortOrder

        public Sort.Order getSortOrder()
        Sort Order. Either asc or desc
        Returns:
        The sortOrder
      • setFieldName

        public ValueFacet setFieldName​(String fieldName)
        Description copied from interface: Facet
        Set the field upon which to apply your facet.
        Specified by:
        setFieldName in interface Facet
        Parameters:
        fieldName - The name of the field
        Returns:
        this.
      • setName

        public ValueFacet setName​(String name)
        Name given to facet
        Parameters:
        name - The name
        Returns:
        this.
      • setSize

        public ValueFacet setSize​(Integer size)
        How many facets would you like to return? Can be between 1 and 250 (or the value of the app_search.engine.total_facet_values_returned.limit configuration setting). 10 facets is the default.
        Parameters:
        size - The number of facets to return
        Returns:
        this.
      • setSortField

        public ValueFacet setSortField​(FacetSortField sortField)
        Sort field. Either count or value
        Parameters:
        sortField - The sort field
        Returns:
        this.
      • setSortOrder

        public ValueFacet setSortOrder​(Sort.Order sortOrder)
        Sort Order. Either asc or desc
        Parameters:
        sortOrder - the sort order
        Returns:
        this.