Class: Google::Cloud::Retail::V2::CompleteQueryResponse
- Inherits:
-
Object
- Object
- Google::Cloud::Retail::V2::CompleteQueryResponse
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/retail/v2/completion_service.rb
Overview
Response of the autocomplete query.
Defined Under Namespace
Classes: AttributeResult, AttributeResultsEntry, CompletionResult, RecentSearchResult
Instance Attribute Summary collapse
-
#attribute_results ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CompleteQueryResponse::AttributeResult}
A map of matched attribute suggestions.
-
#attribution_token ⇒ ::String
A unique complete token.
-
#completion_results ⇒ ::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::CompletionResult>
Results of the matching suggestions.
-
#recent_search_results ⇒ ::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::RecentSearchResult>
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
Instance Attribute Details
#attribute_results ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CompleteQueryResponse::AttributeResult}
Returns A map of matched attribute suggestions. This field is only available for "cloud-retail" dataset.
Current supported keys:
brands
categories
.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'proto_docs/google/cloud/retail/v2/completion_service.rb', line 160 class CompleteQueryResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Resource that represents completion results. # @!attribute [rw] suggestion # @return [::String] # The suggestion for the query. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}] # Custom attributes for the suggestion term. # # * For "user-data", the attributes are additional custom attributes # ingested through BigQuery. # # * For "cloud-retail", the attributes are product attributes generated # by Cloud Retail. It requires # {::Google::Cloud::Retail::V2::UserEvent#product_details UserEvent.product_details} # is imported properly. class CompletionResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Retail::V2::CustomAttribute] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Deprecated: Recent search of this user. # @deprecated This message is deprecated and may be removed in the next major version update. # @!attribute [rw] recent_search # @return [::String] # The recent search query. class RecentSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Resource that represents attribute results. # The list of suggestions for the attribute. # @!attribute [rw] suggestions # @return [::Array<::String>] class AttributeResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Retail::V2::CompleteQueryResponse::AttributeResult] class AttributeResultsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#attribution_token ⇒ ::String
Returns A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'proto_docs/google/cloud/retail/v2/completion_service.rb', line 160 class CompleteQueryResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Resource that represents completion results. # @!attribute [rw] suggestion # @return [::String] # The suggestion for the query. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}] # Custom attributes for the suggestion term. # # * For "user-data", the attributes are additional custom attributes # ingested through BigQuery. # # * For "cloud-retail", the attributes are product attributes generated # by Cloud Retail. It requires # {::Google::Cloud::Retail::V2::UserEvent#product_details UserEvent.product_details} # is imported properly. class CompletionResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Retail::V2::CustomAttribute] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Deprecated: Recent search of this user. # @deprecated This message is deprecated and may be removed in the next major version update. # @!attribute [rw] recent_search # @return [::String] # The recent search query. class RecentSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Resource that represents attribute results. # The list of suggestions for the attribute. # @!attribute [rw] suggestions # @return [::Array<::String>] class AttributeResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Retail::V2::CompleteQueryResponse::AttributeResult] class AttributeResultsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#completion_results ⇒ ::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::CompletionResult>
Returns Results of the matching suggestions. The result list is ordered and the first result is top suggestion.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'proto_docs/google/cloud/retail/v2/completion_service.rb', line 160 class CompleteQueryResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Resource that represents completion results. # @!attribute [rw] suggestion # @return [::String] # The suggestion for the query. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}] # Custom attributes for the suggestion term. # # * For "user-data", the attributes are additional custom attributes # ingested through BigQuery. # # * For "cloud-retail", the attributes are product attributes generated # by Cloud Retail. It requires # {::Google::Cloud::Retail::V2::UserEvent#product_details UserEvent.product_details} # is imported properly. class CompletionResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Retail::V2::CustomAttribute] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Deprecated: Recent search of this user. # @deprecated This message is deprecated and may be removed in the next major version update. # @!attribute [rw] recent_search # @return [::String] # The recent search query. class RecentSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Resource that represents attribute results. # The list of suggestions for the attribute. # @!attribute [rw] suggestions # @return [::Array<::String>] class AttributeResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Retail::V2::CompleteQueryResponse::AttributeResult] class AttributeResultsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#recent_search_results ⇒ ::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::RecentSearchResult>
This field is deprecated and may be removed in the next major version update.
Returns Deprecated. Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. If you want to enable it, contact Retail Search support.
This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules:
They are ordered from latest to oldest.
They are matched with CompleteQueryRequest.query case insensitively.
They are transformed to lower case.
They are UTF-8 safe.
Recent searches are deduplicated. More recent searches will be reserved when duplication happens.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'proto_docs/google/cloud/retail/v2/completion_service.rb', line 160 class CompleteQueryResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Resource that represents completion results. # @!attribute [rw] suggestion # @return [::String] # The suggestion for the query. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}] # Custom attributes for the suggestion term. # # * For "user-data", the attributes are additional custom attributes # ingested through BigQuery. # # * For "cloud-retail", the attributes are product attributes generated # by Cloud Retail. It requires # {::Google::Cloud::Retail::V2::UserEvent#product_details UserEvent.product_details} # is imported properly. class CompletionResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Retail::V2::CustomAttribute] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Deprecated: Recent search of this user. # @deprecated This message is deprecated and may be removed in the next major version update. # @!attribute [rw] recent_search # @return [::String] # The recent search query. class RecentSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Resource that represents attribute results. # The list of suggestions for the attribute. # @!attribute [rw] suggestions # @return [::Array<::String>] class AttributeResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Retail::V2::CompleteQueryResponse::AttributeResult] class AttributeResultsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |