Class: Google::Cloud::Retail::V2::SearchResponse::Facet
- Inherits:
-
Object
- Object
- Google::Cloud::Retail::V2::SearchResponse::Facet
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/retail/v2/search_service.rb
Overview
A facet result.
Defined Under Namespace
Classes: FacetValue
Instance Attribute Summary collapse
-
#dynamic_facet ⇒ ::Boolean
Whether the facet is dynamically generated.
-
#key ⇒ ::String
The key for this facet.
-
#values ⇒ ::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>
The facet values for this field.
Instance Attribute Details
#dynamic_facet ⇒ ::Boolean
Returns Whether the facet is dynamically generated.
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1052 class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colorFamilies". # @!attribute [rw] interval # @return [::Google::Cloud::Retail::V2::Interval] # Interval value for a facet, such as [10, 20) for facet "price". # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. # @!attribute [rw] min_value # @return [::Float] # The minimum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. # @!attribute [rw] max_value # @return [::Float] # The maximum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#key ⇒ ::String
Returns The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1".
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1052 class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colorFamilies". # @!attribute [rw] interval # @return [::Google::Cloud::Retail::V2::Interval] # Interval value for a facet, such as [10, 20) for facet "price". # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. # @!attribute [rw] min_value # @return [::Float] # The minimum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. # @!attribute [rw] max_value # @return [::Float] # The maximum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#values ⇒ ::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>
Returns The facet values for this field.
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1052 class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colorFamilies". # @!attribute [rw] interval # @return [::Google::Cloud::Retail::V2::Interval] # Interval value for a facet, such as [10, 20) for facet "price". # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. # @!attribute [rw] min_value # @return [::Float] # The minimum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. # @!attribute [rw] max_value # @return [::Float] # The maximum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |