Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalogAttributeFacetConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/representations.rb

Overview

Possible options for the facet that corresponds to the current attribute config.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaCatalogAttributeFacetConfig

Returns a new instance of GoogleCloudRetailV2alphaCatalogAttributeFacetConfig.



1640
1641
1642
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1640

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#facet_intervalsArray<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval>

If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound. Corresponds to the JSON property facetIntervals



1620
1621
1622
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1620

def facet_intervals
  @facet_intervals
end

#ignored_facet_valuesArray<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues>

Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25. Corresponds to the JSON property ignoredFacetValues



1627
1628
1629
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1627

def ignored_facet_values
  @ignored_facet_values
end

#merged_facet_valuesArray<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue>

Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if "dark_blue" merged into "BLUE", then the latter can't merge into "blues" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes. Corresponds to the JSON property mergedFacetValues



1638
1639
1640
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1638

def merged_facet_values
  @merged_facet_values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1645
1646
1647
1648
1649
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1645

def update!(**args)
  @facet_intervals = args[:facet_intervals] if args.key?(:facet_intervals)
  @ignored_facet_values = args[:ignored_facet_values] if args.key?(:ignored_facet_values)
  @merged_facet_values = args[:merged_facet_values] if args.key?(:merged_facet_values)
end