Class: Google::Cloud::Retail::V2::SearchResponse

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/retail/v2/search_service.rb

Overview

Response message for SearchService.Search method.

Defined Under Namespace

Classes: ConversationalSearchResult, Facet, QueryExpansionInfo, SearchResult, TileNavigationResult

Instance Attribute Summary collapse

Instance Attribute Details

#applied_controls::Array<::String>

Returns The fully qualified resource name of applied controls.

Returns:

  • (::Array<::String>)

    The fully qualified resource name of applied controls.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#attribution_token::String

Returns A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.

Returns:

  • (::String)

    A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#conversational_search_result::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult

Returns This field specifies all related information that is needed on client side for UI rendering of conversational retail search.

Returns:



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#corrected_query::String

Returns Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.

Returns:

  • (::String)

    Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#experiment_info::Array<::Google::Cloud::Retail::V2::ExperimentInfo>

Returns Metadata related to A/B testing experiment associated with this response. Only exists when an experiment is triggered.

Returns:



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#facets::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet>

Returns Results of facets requested by user.

Returns:



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#invalid_condition_boost_specs::Array<::Google::Cloud::Retail::V2::SearchRequest::BoostSpec::ConditionBoostSpec>

Returns The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#next_page_token::String

Returns A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Returns:

  • (::String)

    A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#pin_control_metadata::Google::Cloud::Retail::V2::PinControlMetadata

Returns Metadata for pin controls which were applicable to the request. This contains two map fields, one for all matched pins and one for pins which were matched but not applied.

The two maps are keyed by pin position, and the values are the product ids which were matched to that pin.

Returns:

  • (::Google::Cloud::Retail::V2::PinControlMetadata)

    Metadata for pin controls which were applicable to the request. This contains two map fields, one for all matched pins and one for pins which were matched but not applied.

    The two maps are keyed by pin position, and the values are the product ids which were matched to that pin.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#query_expansion_info::Google::Cloud::Retail::V2::SearchResponse::QueryExpansionInfo

Returns Query expansion information for the returned results.

Returns:



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#redirect_uri::String

Returns The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.

Returns:

  • (::String)

    The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#results::Array<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>

Returns A list of matched items. The order represents the ranking.

Returns:



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#tile_navigation_result::Google::Cloud::Retail::V2::SearchResponse::TileNavigationResult

Returns This field specifies all related information for tile navigation that will be used in client side.

Returns:



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#total_size::Integer

Returns The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.

Returns:

  • (::Integer)

    The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 1000

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched
  #     {::Google::Cloud::Retail::V2::Product Product}.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Retail::V2::Product]
  #     The product data snippet in the search response. Only
  #     {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be
  #     populated.
  #
  #     {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the
  #     product variants that match the search query. If there are multiple
  #     product variants matching the query, top 5 most relevant product variants
  #     are returned and ordered by relevancy.
  #
  #     If relevancy can be deternmined, use
  #     {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields}
  #     to look up matched product variants fields. If relevancy cannot be
  #     determined, e.g. when searching "shoe" all products in a shoe product can
  #     be a match, 5 product variants are returned but order is meaningless.
  # @!attribute [rw] matching_variant_count
  #   @return [::Integer]
  #     The count of matched
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product}s.
  # @!attribute [rw] matching_variant_fields
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}]
  #     If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} matches the search query, this
  #     map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are
  #     matched. The key is the
  #     {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field
  #     mask of the matched {::Google::Cloud::Retail::V2::Product 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" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query.
  # @!attribute [rw] variant_rollup_values
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     The rollup matching
  #     {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
  #     {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of
  #     the
  #     {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}.
  #     The values are the merged and de-duplicated
  #     {::Google::Cloud::Retail::V2::Product 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 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 {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
  #     values is a double value with type
  #     {::Google::Protobuf::Value 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".
  # @!attribute [rw] personal_labels
  #   @return [::Array<::String>]
  #     Specifies previous events related to this product for this user based on
  #     {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
  #     {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
  #     or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
  #
  #     This is set only when
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
  #     is
  #     {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
  #
  #     Possible values:
  #
  #     * `purchased`: Indicates that this product has been purchased before.
  # @!attribute [rw] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
  #     Google provided available scores.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::FieldMask]
    class MatchingVariantFieldsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class VariantRollupValuesEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Retail::V2::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. E.g., "colorFamilies" or "price" or
  #     "attributes.attr1".
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  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

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # This field specifies all related information that is needed on client
  # side for UI rendering of conversational retail search.
  # @!attribute [rw] conversation_id
  #   @return [::String]
  #     Conversation UUID. This field will be stored in client side storage to
  #     maintain the conversation session with server and will be used for next
  #     search request's
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
  #     to restore conversation state in server.
  # @!attribute [rw] refined_query
  #   @return [::String]
  #     The current refined query for the conversational search. This field
  #     will be used in customer UI that the query in the search bar should be
  #     replaced with the refined query. For example, if
  #     {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
  #     `dress` and next
  #     {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
  #     is `red color`, which does not match any product attribute value filters,
  #     the refined query will be `dress, red color`.
  # @!attribute [rw] additional_filters
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
  #     This field is deprecated but will be kept for backward compatibility.
  #     There is expected to have only one additional filter and the value will
  #     be the same to the same as field `additional_filter`.
  # @!attribute [rw] followup_question
  #   @return [::String]
  #     The follow-up question. e.g., `What is the color?`
  # @!attribute [rw] suggested_answers
  #   @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
  #     The answer options provided to client for the follow-up question.
  # @!attribute [rw] additional_filter
  #   @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
  #     This is the incremental additional filters implied from the current
  #     user answer. User should add the suggested addition filters to the
  #     previous
  #     {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},  and
  #     use the merged filter in the follow up search request.
  class ConversationalSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Suggested answers to the follow-up question.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class SuggestedAnswer
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Additional filter that client side need to apply.
    # @!attribute [rw] product_attribute_value
    #   @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
    #     Product attribute value, including an attribute key and an
    #     attribute value. Other types can be added here in the future.
    class AdditionalFilter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # This field specifies all related information for tile navigation that will
  # be used in client side.
  # @!attribute [rw] tiles
  #   @return [::Array<::Google::Cloud::Retail::V2::Tile>]
  #     The current tiles that are used for tile navigation, sorted by
  #     engagement.
  class TileNavigationResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end