Class FacetConfiguration.FacetConfig

    • Constructor Detail

      • FacetConfig

        public FacetConfig()
    • Method Detail

      • setSourceField

        public FacetConfiguration.FacetConfig setSourceField​(String sourceField)
        Required: Set name of data field that is configured with these config.
        Parameters:
        sourceField -
        Returns:
        self
      • setType

        public FacetConfiguration.FacetConfig setType​(String type)
        Optional type that relates to the available FacetCreators. If not set, it uses the default type of the related field. From some field-types different facet types can be generated:
        • numeric fields generate "interval" facets per default, but can be set to "range"
        • TODO: custom facet creators can support their own facet types
        Parameters:
        type -
        Returns:
        self
      • setMetaData

        public FacetConfiguration.FacetConfig setMetaData​(Map<String,​Object> metaData)
        Optional map that is returned with that facet. Can be used for additional data you need with the facet for visualizing.
        Parameters:
        metaData -
        Returns:
        self
      • setOptimalValueCount

        public FacetConfiguration.FacetConfig setOptimalValueCount​(int optimalValueCount)
        Primary used for numeric facets to build according number of value ranges. Can also be used for advanced displaying term facets.
        Parameters:
        optimalValueCount -
        Returns:
        self
      • setShowUnselectedOptions

        public FacetConfiguration.FacetConfig setShowUnselectedOptions​(boolean showUnselectedOptions)
        Set to true if all options should be shown after filtering on one of the options of the same facet.
        Parameters:
        showUnselectedOptions -
        Returns:
        self
      • setMultiSelect

        public FacetConfiguration.FacetConfig setMultiSelect​(boolean isMultiSelect)
        Set to true if it should be possible to select several different values of the same facet.
        Parameters:
        isMultiSelect -
        Returns:
        self
      • setOrder

        public FacetConfiguration.FacetConfig setOrder​(byte order)
        Optional index, to put the facets in a consistent order.
        Parameters:
        order -
        Returns:
        self
      • setExcludeFromFacetLimit

        public FacetConfiguration.FacetConfig setExcludeFromFacetLimit​(boolean excludeFromFacetLimit)
        If set to true, this facet will always be shown and not removed because of facet limit.
        Parameters:
        excludeFromFacetLimit -
        Returns:
        self