class Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseSearchResult
Represents the search results.
Attributes
Product.id of the searched Product. Corresponds to the JSON property `id` @return [String]
The count of matched variant Products. Corresponds to the JSON property `matchingVariantCount` @return [Fixnum]
If a variant Product matches the search query, this map indicates which Product fields are matched. The key is the Product.name, the value is a field mask of the matched Product fields. If matched attributes cannot be determined, this map will be empty. For example, a key “sku1” with field mask “products. color_info” indicates there is a match between “sku1” ColorInfo and the query. Corresponds to the JSON property `matchingVariantFields` @return [Hash<String,String>]
Product captures all metadata information of items to be recommended or searched. Corresponds to the JSON property `product` @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct]
The rollup matching variant Product attributes. The key is one of the SearchRequest.variant_rollup_keys. The values are the merged and de-duplicated Product attributes. Notice that the rollup values are respect filter. For example, when filtering by “colorFamilies:ANY("red")” and rollup “ colorFamilies”, only “red” is returned. For textual and numerical attributes, the rollup values is a list of string or double values with type google. protobuf.ListValue. For example, if there are two variants with colors “red” and “blue”, the rollup values are ` key: “colorFamilies” value ` list_value ` values ` string_value: “red” ` values ` string_value: “blue” ` ` ` ` For FulfillmentInfo, the rollup values is a double value with type google.protobuf. Value. For example, “key: “pickupInStore.store1” value ` number_value: 10 “` means a there are 10 variants in this product are available in the store “ store1”. Corresponds to the JSON property `variantRollupValues` @return [Hash<String,Object>]
Public Class Methods
# File lib/google/apis/retail_v2alpha/classes.rb, line 3479 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/retail_v2alpha/classes.rb, line 3484 def update!(**args) @id = args[:id] if args.key?(:id) @matching_variant_count = args[:matching_variant_count] if args.key?(:matching_variant_count) @matching_variant_fields = args[:matching_variant_fields] if args.key?(:matching_variant_fields) @product = args[:product] if args.key?(:product) @variant_rollup_values = args[:variant_rollup_values] if args.key?(:variant_rollup_values) end