Interface ProductSearchFacetResultStats

All Superinterfaces:
ProductSearchFacetResult

public interface ProductSearchFacetResultStats extends ProductSearchFacetResult

Result of a stats facet. The data type of min max, mean, and sum matches the data type of the field in the facet expression.


Example to create an instance using the builder pattern

     ProductSearchFacetResultStats productSearchFacetResultStats = ProductSearchFacetResultStats.builder()
             .name("{name}")
             .count(0.3)
             .build()
 
  • Method Details

    • getMin

      @NotNull @NotNull Object getMin()

      The minimum value of the field, scoped to the faceted results.

      Returns:
      min
    • getMax

      @NotNull @NotNull Object getMax()

      The maximum value of the field, scoped to the faceted results.

      Returns:
      max
    • getMean

      Object getMean()

      The average value of the field calculated as sum / count.

      Only returned for number fields.

      Returns:
      mean
    • getSum

      Object getSum()

      The sum of values of the field that match the facet expression.

      Only returned for number fields.

      Returns:
      sum
    • getCount

      @NotNull @NotNull Long getCount()

      The total number of values counted that match the facet expression.

      Returns:
      count
    • setMin

      void setMin(Object min)

      The minimum value of the field, scoped to the faceted results.

      Parameters:
      min - value to be set
    • setMax

      void setMax(Object max)

      The maximum value of the field, scoped to the faceted results.

      Parameters:
      max - value to be set
    • setMean

      void setMean(Object mean)

      The average value of the field calculated as sum / count.

      Only returned for number fields.

      Parameters:
      mean - value to be set
    • setSum

      void setSum(Object sum)

      The sum of values of the field that match the facet expression.

      Only returned for number fields.

      Parameters:
      sum - value to be set
    • setCount

      void setCount(Long count)

      The total number of values counted that match the facet expression.

      Parameters:
      count - value to be set
    • of

      factory method
      Returns:
      instance of ProductSearchFacetResultStats
    • of

      factory method to create a shallow copy ProductSearchFacetResultStats
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      Specified by:
      copyDeep in interface ProductSearchFacetResult
    • deepCopy

      @Nullable static ProductSearchFacetResultStats deepCopy(@Nullable ProductSearchFacetResultStats template)
      factory method to create a deep copy of ProductSearchFacetResultStats
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductSearchFacetResultStats
      Returns:
      builder
    • builder

      create builder for ProductSearchFacetResultStats instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductSearchFacetResultStats

      default <T> T withProductSearchFacetResultStats(Function<ProductSearchFacetResultStats,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ProductSearchFacetResultStats> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference