# Retail V2 API - Class Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig (v2.9.0)

2.9.0 (latest) 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.3.0 1.2.0 1.1.0 1.0.1 0.21.0 0.20.0 0.19.0 0.18.2 0.17.0 0.16.1 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.4 Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #facet_intervals

    def facet_intervals() -> ::Array<::Google::Cloud::Retail::V2::Interval>

**Returns**

- (::Array\<[::Google::Cloud::Retail::V2::Interval](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-Interval)\>) --- If you don't set the facet [SearchRequest.FacetSpec.FacetKey.intervals](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchRequest-FacetSpec-FacetKey#Google__Cloud__Retail__V2__SearchRequest__FacetSpec__FacetKey_intervals_instance_ "Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals (method)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") 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.

### #facet_intervals=

    def facet_intervals=(value) -> ::Array<::Google::Cloud::Retail::V2::Interval>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Retail::V2::Interval](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-Interval)\>) --- If you don't set the facet [SearchRequest.FacetSpec.FacetKey.intervals](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchRequest-FacetSpec-FacetKey#Google__Cloud__Retail__V2__SearchRequest__FacetSpec__FacetKey_intervals_instance_ "Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals (method)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") 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.
**Returns**

- (::Array\<[::Google::Cloud::Retail::V2::Interval](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-Interval)\>) --- If you don't set the facet [SearchRequest.FacetSpec.FacetKey.intervals](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchRequest-FacetSpec-FacetKey#Google__Cloud__Retail__V2__SearchRequest__FacetSpec__FacetKey_intervals_instance_ "Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals (method)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") 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.

### #ignored_facet_values

    def ignored_facet_values() -> ::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::IgnoredFacetValues>

**Returns**

- (::Array\<[::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::IgnoredFacetValues](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-IgnoredFacetValues)\>) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") is 25.

### #ignored_facet_values=

    def ignored_facet_values=(value) -> ::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::IgnoredFacetValues>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::IgnoredFacetValues](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-IgnoredFacetValues)\>) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") is 25.
**Returns**

- (::Array\<[::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::IgnoredFacetValues](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-IgnoredFacetValues)\>) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") is 25.

### #merged_facet

    def merged_facet() -> ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet

**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-MergedFacet)) --- Use this field only if you want to merge a facet key into another facet key.

### #merged_facet=

    def merged_facet=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet

**Parameter**

- **value** ([::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-MergedFacet)) --- Use this field only if you want to merge a facet key into another facet key.
**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-MergedFacet)) --- Use this field only if you want to merge a facet key into another facet key.

### #merged_facet_values

    def merged_facet_values() -> ::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>

**Returns**

- (::Array\<[::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-MergedFacetValue)\>) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") is 100. This feature is available only for textual custom attributes.

### #merged_facet_values=

    def merged_facet_values=(value) -> ::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-MergedFacetValue)\>) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") is 100. This feature is available only for textual custom attributes.
**Returns**

- (::Array\<[::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-MergedFacetValue)\>) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") is 100. This feature is available only for textual custom attributes.

### #rerank_config

    def rerank_config() -> ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::RerankConfig

**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::RerankConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-RerankConfig)) --- Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys.

### #rerank_config=

    def rerank_config=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::RerankConfig

**Parameter**

- **value** ([::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::RerankConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-RerankConfig)) --- Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys.
**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::RerankConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig-RerankConfig)) --- Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys.