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.
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1137 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". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::Retail::V2::Interval] # Interval value for a facet, such as [10, 20) for facet "price". # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!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".
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1137 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". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::Retail::V2::Interval] # Interval value for a facet, such as [10, 20) for facet "price". # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!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.
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1137 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". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::Retail::V2::Interval] # Interval value for a facet, such as [10, 20) for facet "price". # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!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 |