Interface SearchFacet

All Superinterfaces:
MultiTenantCloneable<SearchFacet>, Serializable
All Known Implementing Classes:
SearchFacetImpl

public interface SearchFacet extends Serializable, MultiTenantCloneable<SearchFacet>
A SearchFacet is an object that represents a particular facet that can be used to guide faceted searching on a results page.
Author:
Andre Azzolini (apazzolini)
  • Method Details

    • getId

      Long getId()
      Returns the internal id
      Returns:
      the internal id
    • setId

      void setId(Long id)
      Sets the internal id
      Parameters:
      id -
    • getFieldType

      IndexFieldType getFieldType()
      The main relationship to the rest of the search index entities
    • setFieldType

      void setFieldType(IndexFieldType fieldType)
    • getField

      Field getField()

      Returns the field associated with this facet.

      This is a convenience method for

      getFieldType().getIndexField().getField()
      Returns:
      the fieldName
    • getFacetFieldType

      String getFacetFieldType()

      This String represents the FieldType for the given SearchFacet. This is the FieldType that will be used when this Field is indexed in Solr

      This is a convience method for

      getFieldType().getFieldType().getType()
      Returns:
      the String representing the FieldType of this SearchFacet
    • getName

      String getName()
      Gets the name of this SearchFacet. This is for admin naming purposes.
      Returns:
      the name
    • setName

      void setName(String name)
      Sets the name
      Parameters:
      name -
      See Also:
    • getLabel

      String getLabel()
      Gets the label of this SearchFacet. This is the label that will be used for the user-friendly display name of this facet
      Returns:
      the label
    • setLabel

      void setLabel(String label)
      Sets the label
      Parameters:
      label -
      See Also:
    • getShowOnSearch

      Boolean getShowOnSearch()
      Gets a boolean that specifies whether or not this SearchFacet should be displayed on search result pages in addition to category pages
      Returns:
      whether or not to display on search result pages
    • setShowOnSearch

      void setShowOnSearch(Boolean showOnSearch)
      Sets showOnSearch
      Parameters:
      showOnSearch -
      See Also:
    • getSearchDisplayPriority

      Integer getSearchDisplayPriority()
      Gets the display priority of this SearchFacet on search result pages
      Returns:
      the priority
    • setSearchDisplayPriority

      void setSearchDisplayPriority(Integer searchDisplayPriority)
      Sets the display priority on search result pages
      Parameters:
      searchDisplayPriority -
    • getCanMultiselect

      Boolean getCanMultiselect()
      Gets whether or not you can multiselect values for this Facet
      Returns:
      the multiselect flag
    • setCanMultiselect

      void setCanMultiselect(Boolean canMultiselect)
      Sets whether or not you can multiselect values for this Facet.
      Parameters:
      canMultiselect -
    • getUseFacetRanges

      Boolean getUseFacetRanges()
      Gets whether or not this facet uses facet ranges
      Returns:
      the useFacetRanges flag
    • setUseFacetRanges

      void setUseFacetRanges(Boolean useFacetRanges)
      Sets useFacetRanges
      See Also:
    • getSearchFacetRanges

      List<SearchFacetRange> getSearchFacetRanges()
      Gets the applicable ranges for this search facet, if any are specified. For example, the SearchFacet that interacts with "Manufacturers" might not have any ranges defined (as it would depend on the manufacturers that are in the result list), but a facet on "Price" might have predefined ranges (such as 0-5, 5-10, 10-20).
      Returns:
      the associated search facet ranges, if any
    • setSearchFacetRanges

      void setSearchFacetRanges(List<SearchFacetRange> searchFacetRanges)
      Sets the SearchFacetRanges Note: This method will set ALL search facet ranges
      Parameters:
      searchFacetRanges -
      See Also:
    • getRequiredFacets

      List<RequiredFacet> getRequiredFacets()
      Returns:
      a list of SearchFacets that must have an active value set for this SearchFacet to be applicable.
      See Also:
    • setRequiredFacets

      void setRequiredFacets(List<RequiredFacet> requiredFacets)
      Sets the list of facets which this facet depends on.
      Parameters:
      requiredFacets -
    • getRequiresAllDependentFacets

      Boolean getRequiresAllDependentFacets()
      This boolean controls whether or not this particular facet requires one of the dependent facets to be active, or if it requires all of the dependent facets to be active.
      Returns:
      whether the dependent facet list should be AND'ed together
      See Also:
    • setRequiresAllDependentFacets

      void setRequiresAllDependentFacets(Boolean requiresAllDependentFacets)
      Sets whether or not all dependent facets must be active, or if only one is necessary
      Parameters:
      requiresAllDependentFacets -