docs: Keep the API doc up-to-date

PiperOrigin-RevId: 391605108
pull/672/head
Google APIs 4 years ago committed by Copybara-Service
parent 853cfd33b6
commit 62d50355df
  1. 2
      google/cloud/retail/v2/catalog.proto
  2. 10
      google/cloud/retail/v2/catalog_service.proto
  3. 2
      google/cloud/retail/v2/common.proto
  4. 30
      google/cloud/retail/v2/completion_service.proto
  5. 10
      google/cloud/retail/v2/import_config.proto
  6. 2
      google/cloud/retail/v2/prediction_service.proto
  7. 16
      google/cloud/retail/v2/product.proto
  8. 14
      google/cloud/retail/v2/product_service.proto
  9. 2
      google/cloud/retail/v2/purge_config.proto
  10. 2
      google/cloud/retail/v2/retail_v2.yaml
  11. 178
      google/cloud/retail/v2/search_service.proto
  12. 20
      google/cloud/retail/v2/user_event.proto
  13. 2
      google/cloud/retail/v2/user_event_service.proto
  14. 2
      google/cloud/retail/v2alpha/catalog.proto
  15. 8
      google/cloud/retail/v2alpha/catalog_service.proto
  16. 36
      google/cloud/retail/v2alpha/completion_service.proto
  17. 8
      google/cloud/retail/v2alpha/import_config.proto
  18. 14
      google/cloud/retail/v2alpha/product.proto
  19. 12
      google/cloud/retail/v2alpha/product_service.proto
  20. 192
      google/cloud/retail/v2alpha/search_service.proto
  21. 18
      google/cloud/retail/v2alpha/user_event.proto
  22. 8
      google/cloud/retail/v2beta/catalog_service.proto
  23. 28
      google/cloud/retail/v2beta/completion_service.proto
  24. 8
      google/cloud/retail/v2beta/import_config.proto
  25. 14
      google/cloud/retail/v2beta/product.proto
  26. 12
      google/cloud/retail/v2beta/product_service.proto
  27. 180
      google/cloud/retail/v2beta/search_service.proto
  28. 18
      google/cloud/retail/v2beta/user_event.proto

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -93,8 +93,8 @@ service CatalogService {
// {newBranch}. // {newBranch}.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc SetDefaultBranch(SetDefaultBranchRequest) rpc SetDefaultBranch(SetDefaultBranchRequest)
returns (google.protobuf.Empty) { returns (google.protobuf.Empty) {
option (google.api.http) = { option (google.api.http) = {
@ -109,8 +109,8 @@ service CatalogService {
// method under a specified parent catalog. // method under a specified parent catalog.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc GetDefaultBranch(GetDefaultBranchRequest) rpc GetDefaultBranch(GetDefaultBranchRequest)
returns (GetDefaultBranchResponse) { returns (GetDefaultBranchResponse) {
option (google.api.http) = { option (google.api.http) = {

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -36,8 +36,8 @@ option ruby_package = "Google::Cloud::Retail::V2";
// Auto-completion service for retail. // Auto-completion service for retail.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
service CompletionService { service CompletionService {
option (google.api.default_host) = "retail.googleapis.com"; option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) = option (google.api.oauth_scopes) =
@ -46,8 +46,8 @@ service CompletionService {
// Completes the specified prefix with keyword suggestions. // Completes the specified prefix with keyword suggestions.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
option (google.api.http) = { option (google.api.http) = {
get: "/v2/{catalog=projects/*/locations/*/catalogs/*}:completeQuery" get: "/v2/{catalog=projects/*/locations/*/catalogs/*}:completeQuery"
@ -59,8 +59,8 @@ service CompletionService {
// Request processing may be synchronous. Partial updating is not supported. // Request processing may be synchronous. Partial updating is not supported.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc ImportCompletionData(ImportCompletionDataRequest) rpc ImportCompletionData(ImportCompletionDataRequest)
returns (google.longrunning.Operation) { returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {
@ -135,13 +135,15 @@ message CompleteQueryRequest {
// * user-data // * user-data
// //
// * cloud-retail // * cloud-retail
// This option is not automatically enabled. Before using cloud-retail, // This option requires additional allowlisting. Before using cloud-retail,
// contact retail-search-support@google.com first. // contact Cloud Retail support team first.
string dataset = 6; string dataset = 6;
// Completion max suggestions. // Completion max suggestions. If left unset or set to 0, then will fallback
// to the configured value [CompletionConfig.max_suggestions][].
// //
// The maximum allowed max suggestions is 20. The default value is 20. // The maximum allowed max suggestions is 20. If it is set higher, it will be
// capped by 20.
int32 max_suggestions = 5; int32 max_suggestions = 5;
} }
@ -172,9 +174,9 @@ message CompleteQueryResponse {
// performance. // performance.
string attribution_token = 2; string attribution_token = 2;
// Matched recent searches of this user. This field is a restricted feature. // Matched recent searches of this user. The maximum number of recent searches
// Contact Retail Support (retail-search-support@google.com) if you are // is 10. This field is a restricted feature. Contact Retail Search support
// interested in enabling it. // team if you are interested in enabling it.
// //
// This feature is only available when // This feature is only available when
// [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id] // [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -160,13 +160,13 @@ message ImportProductsRequest {
// Can only be while using // Can only be while using
// [BigQuerySource][google.cloud.retail.v2.BigQuerySource]. // [BigQuerySource][google.cloud.retail.v2.BigQuerySource].
// //
// Add the IAM permission BigQuery Data Viewer for // Add the IAM permission "BigQuery Data Viewer" for
// cloud-retail-customer-data-access@system.gserviceaccount.com before // cloud-retail-customer-data-access@system.gserviceaccount.com before
// using this feature otherwise an error is thrown. // using this feature otherwise an error is thrown.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
FULL = 2; FULL = 2;
} }
@ -303,7 +303,7 @@ message CompletionDataInputConfig {
oneof source { oneof source {
// Required. BigQuery input source. // Required. BigQuery input source.
// //
// Add the IAM permission BigQuery Data Viewer for // Add the IAM permission "BigQuery Data Viewer" for
// cloud-retail-customer-data-access@system.gserviceaccount.com before // cloud-retail-customer-data-access@system.gserviceaccount.com before
// using this feature otherwise an error is thrown. // using this feature otherwise an error is thrown.
BigQuerySource big_query_source = 1 BigQuerySource big_query_source = 1

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -310,13 +310,9 @@ message Product {
// This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT // This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
// error is returned: // error is returned:
// //
// * Max entries count: 200 by default; 100 for // * Max entries count: 200.
// [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
// * The key must be a UTF-8 encoded string with a length limit of 128 // * The key must be a UTF-8 encoded string with a length limit of 128
// characters. // characters.
// * Max indexable entries count: 200 by default; 40 for
// [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
// * Max searchable entries count: 30.
// * For indexable attribute, the key must match the pattern: // * For indexable attribute, the key must match the pattern:
// [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS. // [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS.
map<string, CustomAttribute> attributes = 12; map<string, CustomAttribute> attributes = 12;
@ -426,7 +422,7 @@ message Product {
// The material of the product. For example, "leather", "wooden". // The material of the product. For example, "leather", "wooden".
// //
// A maximum of 5 values are allowed. Each value must be a UTF-8 encoded // A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
// string with a length limit of 128 characters. Otherwise, an // string with a length limit of 128 characters. Otherwise, an
// INVALID_ARGUMENT error is returned. // INVALID_ARGUMENT error is returned.
// //
@ -525,8 +521,12 @@ message Product {
// * [name][google.cloud.retail.v2.Product.name] // * [name][google.cloud.retail.v2.Product.name]
// * [color_info][google.cloud.retail.v2.Product.color_info] // * [color_info][google.cloud.retail.v2.Product.color_info]
// //
// Maximum number of paths is 20. Otherwise, an INVALID_ARGUMENT error is // Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
// returned. // returned.
//
// Note: Returning more fields in
// [SearchResponse][google.cloud.retail.v2.SearchResponse] may increase
// response payload size and serving latency.
google.protobuf.FieldMask retrievable_fields = 30; google.protobuf.FieldMask retrievable_fields = 30;
// Output only. Product variants grouped together on primary product which // Output only. Product variants grouped together on primary product which

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -143,8 +143,8 @@ service ProductService {
// [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. // [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) { rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {
post: "/v2/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory" post: "/v2/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory"
@ -170,8 +170,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. // [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest) rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest)
returns (google.longrunning.Operation) { returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {
@ -198,8 +198,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. // [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest) rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest)
returns (google.longrunning.Operation) { returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.

@ -59,8 +59,8 @@ http:
- selector: google.longrunning.Operations.GetOperation - selector: google.longrunning.Operations.GetOperation
get: '/v2/{name=projects/*/locations/*/operations/*}' get: '/v2/{name=projects/*/locations/*/operations/*}'
additional_bindings: additional_bindings:
- get: '/v2/{name=projects/*/locations/*/catalogs/*/operations/*}'
- get: '/v2/{name=projects/*/locations/*/catalogs/*/branches/*/operations/*}' - get: '/v2/{name=projects/*/locations/*/catalogs/*/branches/*/operations/*}'
- get: '/v2/{name=projects/*/locations/*/catalogs/*/operations/*}'
- selector: google.longrunning.Operations.ListOperations - selector: google.longrunning.Operations.ListOperations
get: '/v2/{name=projects/*/locations/*}/operations' get: '/v2/{name=projects/*/locations/*}/operations'
additional_bindings: additional_bindings:

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -39,8 +39,8 @@ option ruby_package = "Google::Cloud::Retail::V2";
// Service for search. // Service for search.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
service SearchService { service SearchService {
option (google.api.default_host) = "retail.googleapis.com"; option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) = option (google.api.oauth_scopes) =
@ -49,8 +49,8 @@ service SearchService {
// Performs a search. // Performs a search.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc Search(SearchRequest) returns (SearchResponse) { rpc Search(SearchRequest) returns (SearchResponse) {
option (google.api.http) = { option (google.api.http) = {
post: "/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search" post: "/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search"
@ -74,35 +74,35 @@ message SearchRequest {
// [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query] // [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
// is not specified: // is not specified:
// //
// Textual facet keys: // * textual_field =
// * brands // * "brands"
// * categories // * "categories"
// * genders // * "genders"
// * ageGroups // * "ageGroups"
// * availability // * "availability"
// * colorFamilies // * "colorFamilies"
// * colors // * "colors"
// * sizes // * "sizes"
// * materials // * "materials"
// * patterns // * "patterns"
// * conditions // * "conditions"
// * attributes.key // * "attributes.key"
// * pickupInStore // * "pickupInStore"
// * shipToStore // * "shipToStore"
// * sameDayDelivery // * "sameDayDelivery"
// * nextDayDelivery // * "nextDayDelivery"
// * customFulfillment1 // * "customFulfillment1"
// * customFulfillment2 // * "customFulfillment2"
// * customFulfillment3 // * "customFulfillment3"
// * customFulfillment4 // * "customFulfillment4"
// * customFulfillment5 // * "customFulfillment5"
// //
// Numeric facet keys: // * numerical_field =
// * price // * "price"
// * discount // * "discount"
// * rating // * "rating"
// * ratingCount // * "ratingCount"
// * attributes.key // * "attributes.key"
string key = 1 [(google.api.field_behavior) = REQUIRED]; string key = 1 [(google.api.field_behavior) = REQUIRED];
// Set only if values should be bucketized into intervals. Must be set // Set only if values should be bucketized into intervals. Must be set
@ -166,7 +166,8 @@ message SearchRequest {
// order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical // order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
// intervals are sorted in the order given by // intervals are sorted in the order given by
// [FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]; // [FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals];
// [FulfillmentInfo.ids][] are sorted in the order given by // [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// are sorted in the order given by
// [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.restricted_values]. // [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.restricted_values].
string order_by = 4; string order_by = 4;
@ -287,12 +288,11 @@ message SearchRequest {
// Examples: // Examples:
// //
// * To boost products with product ID "product_1" or "product_2", and // * To boost products with product ID "product_1" or "product_2", and
// color "Red" or "Blue": // color
// ``` // "Red" or "Blue":<br>
// (id: ANY("product_1", "product_2")) // *(id: ANY("product_1", "product_2"))<br>*
// AND // *AND<br>*
// (colorFamilies: ANY("Red", "Blue")) // *(colorFamilies: ANY("Red", "Blue"))<br>*
// ```
string condition = 1; string condition = 1;
// Strength of the condition boost, which should be in [-1, 1]. Negative // Strength of the condition boost, which should be in [-1, 1]. Negative
@ -343,6 +343,11 @@ message SearchRequest {
// The condition under which query expansion should occur. Default to // The condition under which query expansion should occur. Default to
// [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. // [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
Condition condition = 1; Condition condition = 1;
// Whether to pin unexpanded results. If this field is set to true,
// unexpanded products are always at the top of the search results, followed
// by the expanded results.
bool pin_unexpanded_results = 2;
} }
// Required. The resource name of the search engine placement, such as // Required. The resource name of the search engine placement, such as
@ -409,7 +414,8 @@ message SearchRequest {
// The filter syntax consists of an expression language for constructing a // The filter syntax consists of an expression language for constructing a
// predicate from one or more fields of the products being filtered. Filter // predicate from one or more fields of the products being filtered. Filter
// expression is case-sensitive. // expression is case-sensitive. See more details at this [user
// guide](/retail/private/docs/filter-and-order#filter).
// //
// If this field is unrecognizable, an INVALID_ARGUMENT is returned. // If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string filter = 10; string filter = 10;
@ -427,7 +433,9 @@ message SearchRequest {
// The order in which products are returned. Products can be ordered by // The order in which products are returned. Products can be ordered by
// a field in an [Product][google.cloud.retail.v2.Product] object. Leave it // a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
// unset if ordered by relevance. OrderBy expression is case-sensitive. // unset if ordered by relevance. OrderBy expression is case-sensitive. See
// more details at this [user
// guide](/retail/private/docs/filter-and-order#order).
// //
// If this field is unrecognizable, an INVALID_ARGUMENT is returned. // If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string order_by = 11; string order_by = 11;
@ -441,16 +449,17 @@ message SearchRequest {
// The specification for dynamically generated facets. Notice that only // The specification for dynamically generated facets. Notice that only
// textual facets can be dynamically generated. // textual facets can be dynamically generated.
// //
// This feature requires additional allowlisting. Contact Retail Support // This feature requires additional allowlisting. Contact Retail Search
// (retail-search-support@google.com) if you are interested in using dynamic // support team if you are interested in using dynamic facet feature.
// facet feature.
DynamicFacetSpec dynamic_facet_spec = 21; DynamicFacetSpec dynamic_facet_spec = 21;
// Boost specification to boost certain products. // Boost specification to boost certain products. See more details at this
// [user guide](/retail/private/docs/boosting).
BoostSpec boost_spec = 13; BoostSpec boost_spec = 13;
// The query expansion specification that specifies the conditions under which // The query expansion specification that specifies the conditions under which
// query expansion will occur. // query expansion will occur. See more details at this [user
// guide](/retail/private/docs/result-size#query_expansion).
QueryExpansionSpec query_expansion_spec = 14; QueryExpansionSpec query_expansion_spec = 14;
// The keys to fetch and rollup the matching // The keys to fetch and rollup the matching
@ -462,10 +471,9 @@ message SearchRequest {
// [Product][google.cloud.retail.v2.Product]s attributes will lead to extra // [Product][google.cloud.retail.v2.Product]s attributes will lead to extra
// query latency. Maximum number of keys is 10. // query latency. Maximum number of keys is 10.
// //
// For // For [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo], a
// [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info], // fulfillment type and a fulfillment ID must be provided in the format of
// a fulfillment type and a fulfillment ID must be provided in the format of // "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
// "fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123",
// "pickupInStore" is fulfillment type and "store123" is the store ID. // "pickupInStore" is fulfillment type and "store123" is the store ID.
// //
// Supported keys are: // Supported keys are:
@ -476,24 +484,42 @@ message SearchRequest {
// * discount // * discount
// * attributes.key, where key is any key in the // * attributes.key, where key is any key in the
// [Product.attributes][google.cloud.retail.v2.Product.attributes] map. // [Product.attributes][google.cloud.retail.v2.Product.attributes] map.
// * pickupInStore.id, where id is any [FulfillmentInfo.ids][] for type // * pickupInStore.id, where id is any
// [FulfillmentInfo.Type.PICKUP_IN_STORE][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// * shipToStore.id, where id is any [FulfillmentInfo.ids][] for type // for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// [FulfillmentInfo.Type.SHIP_TO_STORE][]. // "pickup-in-store".
// * sameDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type // * shipToStore.id, where id is any
// [FulfillmentInfo.Type.SAME_DAY_DELIVERY][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// * nextDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type // for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// [FulfillmentInfo.Type.NEXT_DAY_DELIVERY][]. // "ship-to-store".
// * customFulfillment1.id, where id is any [FulfillmentInfo.ids][] for type // * sameDayDelivery.id, where id is any
// [FulfillmentInfo.Type.CUSTOM_TYPE_1][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// * customFulfillment2.id, where id is any [FulfillmentInfo.ids][] for type // for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// [FulfillmentInfo.Type.CUSTOM_TYPE_2][]. // "same-day-delivery".
// * customFulfillment3.id, where id is any [FulfillmentInfo.ids][] for type // * nextDayDelivery.id, where id is any
// [FulfillmentInfo.Type.CUSTOM_TYPE_3][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// * customFulfillment4.id, where id is any [FulfillmentInfo.ids][] for type // for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// [FulfillmentInfo.Type.CUSTOM_TYPE_4][]. // "next-day-delivery".
// * customFulfillment5.id, where id is any [FulfillmentInfo.ids][] for type // * customFulfillment1.id, where id is any
// [FulfillmentInfo.Type.CUSTOM_TYPE_5][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-1".
// * customFulfillment2.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-2".
// * customFulfillment3.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-3".
// * customFulfillment4.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-4".
// * customFulfillment5.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-5".
// //
// If this field is set to an invalid value other than these, an // If this field is set to an invalid value other than these, an
// INVALID_ARGUMENT error is returned. // INVALID_ARGUMENT error is returned.
@ -583,10 +609,9 @@ message SearchResponse {
// } // }
// } // }
// //
// For // For [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo], the rollup
// [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info], // values is a double value with type
// the rollup values is a double value with type // [google.protobuf.Value][google.protobuf.Value]. For example,
// [google.protobuf.Value][google.protobuf.Value]. For example:
// `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there // `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
// are 10 variants in this product are available in the store "store1". // are 10 variants in this product are available in the store "store1".
map<string, google.protobuf.Value> variant_rollup_values = 5; map<string, google.protobuf.Value> variant_rollup_values = 5;
@ -625,6 +650,11 @@ message SearchResponse {
message QueryExpansionInfo { message QueryExpansionInfo {
// Bool describing whether query expansion has occurred. // Bool describing whether query expansion has occurred.
bool expanded_query = 1; bool expanded_query = 1;
// Number of pinned results. This field will only be set when expansion
// happens and [SearchRequest.query_expansion_spec.pin_unexpanded_results][]
// is set to true.
int64 pinned_result_count = 2;
} }
// A list of matched items. The order represents the ranking. // A list of matched items. The order represents the ranking.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -258,9 +258,21 @@ message UserEvent {
message ProductDetail { message ProductDetail {
// Required. [Product][google.cloud.retail.v2.Product] information. // Required. [Product][google.cloud.retail.v2.Product] information.
// //
// Only [Product.id][google.cloud.retail.v2.Product.id] field is used when // Required field(s):
// ingesting an event, all other product fields are ignored as we will look //
// them up from the catalog. // * [Product.id][google.cloud.retail.v2.Product.id]
//
// Optional override field(s):
//
// * [Product.price_info][google.cloud.retail.v2.Product.price_info]
//
// If any supported optional fields are provided, we will treat them as a full
// override when looking up product information from the catalog. Thus, it is
// important to ensure that the overriding fields are accurate and
// complete.
//
// All other product fields are ignored and instead populated via catalog
// lookup after event ingestion.
Product product = 1 [(google.api.field_behavior) = REQUIRED]; Product product = 1 [(google.api.field_behavior) = REQUIRED];
// Quantity of the product associated with the user event. // Quantity of the product associated with the user event.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.

@ -104,7 +104,7 @@ message MerchantCenterLink {
// String representing the destination to import for, all if left empty. // String representing the destination to import for, all if left empty.
// List of possible values can be found here. // List of possible values can be found here.
// [https://support.google.com/merchants/answer/7501026?hl=en] // [https://support.google.com/merchants/answer/7501026]
// List of allowed string values: // List of allowed string values:
// "shopping-ads", "buy-on-google-listings", "display-ads", "local-inventory // "shopping-ads", "buy-on-google-listings", "display-ads", "local-inventory
// -ads", "free-listings", "free-local-listings" // -ads", "free-listings", "free-local-listings"

@ -93,8 +93,8 @@ service CatalogService {
// {newBranch}. // {newBranch}.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc SetDefaultBranch(SetDefaultBranchRequest) rpc SetDefaultBranch(SetDefaultBranchRequest)
returns (google.protobuf.Empty) { returns (google.protobuf.Empty) {
option (google.api.http) = { option (google.api.http) = {
@ -109,8 +109,8 @@ service CatalogService {
// method under a specified parent catalog. // method under a specified parent catalog.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc GetDefaultBranch(GetDefaultBranchRequest) rpc GetDefaultBranch(GetDefaultBranchRequest)
returns (GetDefaultBranchResponse) { returns (GetDefaultBranchResponse) {
option (google.api.http) = { option (google.api.http) = {

@ -36,8 +36,8 @@ option ruby_package = "Google::Cloud::Retail::V2alpha";
// Auto-completion service for retail. // Auto-completion service for retail.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
service CompletionService { service CompletionService {
option (google.api.default_host) = "retail.googleapis.com"; option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) = option (google.api.oauth_scopes) =
@ -46,8 +46,8 @@ service CompletionService {
// Completes the specified prefix with keyword suggestions. // Completes the specified prefix with keyword suggestions.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
option (google.api.http) = { option (google.api.http) = {
get: "/v2alpha/{catalog=projects/*/locations/*/catalogs/*}:completeQuery" get: "/v2alpha/{catalog=projects/*/locations/*/catalogs/*}:completeQuery"
@ -59,8 +59,8 @@ service CompletionService {
// Request processing may be synchronous. Partial updating is not supported. // Request processing may be synchronous. Partial updating is not supported.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc ImportCompletionData(ImportCompletionDataRequest) rpc ImportCompletionData(ImportCompletionDataRequest)
returns (google.longrunning.Operation) { returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {
@ -125,22 +125,26 @@ message CompleteQueryRequest {
string device_type = 4; string device_type = 4;
// Determines which dataset to use for fetching completion. "user-data" will // Determines which dataset to use for fetching completion. "user-data" will
// use the imported dataset through [ImportCompletionData][]. "cloud-retail" // use the imported dataset through
// will use the dataset generated by cloud retail based on user events. If // [CompletionService.ImportCompletionData][google.cloud.retail.v2alpha.CompletionService.ImportCompletionData].
// leave empty, it will use the "user-data". // "cloud-retail" will use the dataset generated by cloud retail based on user
// events. If leave empty, it will use the "user-data".
// //
// Current supported values: // Current supported values:
// //
// * user-data // * user-data
// //
// * cloud-retail // * cloud-retail
// This option is not automatically enabled. Before using cloud-retail, // This option requires additional allowlisting. Before using cloud-retail,
// contact retail-search-support@google.com first. // contact Cloud Retail support team first.
string dataset = 6; string dataset = 6;
// Completion max suggestions. // Completion max suggestions. If left unset or set to 0, then will fallback
// to the configured value
// [CompletionConfig.max_suggestions][google.cloud.retail.v2alpha.CompletionConfig.max_suggestions].
// //
// The maximum allowed max suggestions is 20. The default value is 20. // The maximum allowed max suggestions is 20. If it is set higher, it will be
// capped by 20.
int32 max_suggestions = 5; int32 max_suggestions = 5;
} }
@ -171,9 +175,9 @@ message CompleteQueryResponse {
// performance. // performance.
string attribution_token = 2; string attribution_token = 2;
// Matched recent searches of this user. This field is a restricted feature. // Matched recent searches of this user. The maximum number of recent searches
// Contact Retail Support (retail-search-support@google.com) if you are // is 10. This field is a restricted feature. Contact Retail Search support
// interested in enabling it. // team if you are interested in enabling it.
// //
// This feature is only available when // This feature is only available when
// [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id] // [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]

@ -160,13 +160,13 @@ message ImportProductsRequest {
// Can only be while using // Can only be while using
// [BigQuerySource][google.cloud.retail.v2alpha.BigQuerySource]. // [BigQuerySource][google.cloud.retail.v2alpha.BigQuerySource].
// //
// Add the IAM permission BigQuery Data Viewer for // Add the IAM permission "BigQuery Data Viewer" for
// cloud-retail-customer-data-access@system.gserviceaccount.com before // cloud-retail-customer-data-access@system.gserviceaccount.com before
// using this feature otherwise an error is thrown. // using this feature otherwise an error is thrown.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
FULL = 2; FULL = 2;
} }
@ -303,7 +303,7 @@ message CompletionDataInputConfig {
oneof source { oneof source {
// Required. BigQuery input source. // Required. BigQuery input source.
// //
// Add the IAM permission BigQuery Data Viewer for // Add the IAM permission "BigQuery Data Viewer" for
// cloud-retail-customer-data-access@system.gserviceaccount.com before // cloud-retail-customer-data-access@system.gserviceaccount.com before
// using this feature otherwise an error is thrown. // using this feature otherwise an error is thrown.
BigQuerySource big_query_source = 1 BigQuerySource big_query_source = 1

@ -316,13 +316,9 @@ message Product {
// This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT // This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
// error is returned: // error is returned:
// //
// * Max entries count: 200 by default; 100 for // * Max entries count: 200.
// [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT].
// * The key must be a UTF-8 encoded string with a length limit of 128 // * The key must be a UTF-8 encoded string with a length limit of 128
// characters. // characters.
// * Max indexable entries count: 200 by default; 40 for
// [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT].
// * Max searchable entries count: 30.
// * For indexable attribute, the key must match the pattern: // * For indexable attribute, the key must match the pattern:
// [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS. // [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS.
map<string, CustomAttribute> attributes = 12; map<string, CustomAttribute> attributes = 12;
@ -432,7 +428,7 @@ message Product {
// The material of the product. For example, "leather", "wooden". // The material of the product. For example, "leather", "wooden".
// //
// A maximum of 5 values are allowed. Each value must be a UTF-8 encoded // A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
// string with a length limit of 128 characters. Otherwise, an // string with a length limit of 128 characters. Otherwise, an
// INVALID_ARGUMENT error is returned. // INVALID_ARGUMENT error is returned.
// //
@ -533,8 +529,12 @@ message Product {
// * [name][google.cloud.retail.v2alpha.Product.name] // * [name][google.cloud.retail.v2alpha.Product.name]
// * [color_info][google.cloud.retail.v2alpha.Product.color_info] // * [color_info][google.cloud.retail.v2alpha.Product.color_info]
// //
// Maximum number of paths is 20. Otherwise, an INVALID_ARGUMENT error is // Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
// returned. // returned.
//
// Note: Returning more fields in
// [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase
// response payload size and serving latency.
google.protobuf.FieldMask retrievable_fields = 30; google.protobuf.FieldMask retrievable_fields = 30;
// Output only. Product variants grouped together on primary product which // Output only. Product variants grouped together on primary product which

@ -146,8 +146,8 @@ service ProductService {
// [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. // [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) { rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {
post: "/v2alpha/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory" post: "/v2alpha/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory"
@ -173,8 +173,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest) rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest)
returns (google.longrunning.Operation) { returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {
@ -201,8 +201,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest) rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest)
returns (google.longrunning.Operation) { returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {

@ -39,8 +39,8 @@ option ruby_package = "Google::Cloud::Retail::V2alpha";
// Service for search. // Service for search.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
service SearchService { service SearchService {
option (google.api.default_host) = "retail.googleapis.com"; option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) = option (google.api.oauth_scopes) =
@ -49,8 +49,8 @@ service SearchService {
// Performs a search. // Performs a search.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc Search(SearchRequest) returns (SearchResponse) { rpc Search(SearchRequest) returns (SearchResponse) {
option (google.api.http) = { option (google.api.http) = {
post: "/v2alpha/{placement=projects/*/locations/*/catalogs/*/placements/*}:search" post: "/v2alpha/{placement=projects/*/locations/*/catalogs/*/placements/*}:search"
@ -68,42 +68,42 @@ message SearchRequest {
// Specifies how a facet is computed. // Specifies how a facet is computed.
message FacetKey { message FacetKey {
// Required. Supported textual and numerical facet keys in // Required. Supported textual and numerical facet keys in
// [Product][google.cloud.retail.v2alpha.Product] object, over which the // [Product][google.cloud.retail.v2.Product] object, over which the facet
// facet values are computed. Facet key is case-sensitive. // values are computed. Facet key is case-sensitive.
// //
// Allowed facet keys when // Allowed facet keys when
// [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query] // [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
// is not specified: // is not specified:
// //
// Textual facet keys: // * textual_field =
// * brands // * "brands"
// * categories // * "categories"
// * genders // * "genders"
// * ageGroups // * "ageGroups"
// * availability // * "availability"
// * colorFamilies // * "colorFamilies"
// * colors // * "colors"
// * sizes // * "sizes"
// * materials // * "materials"
// * patterns // * "patterns"
// * conditions // * "conditions"
// * attributes.key // * "attributes.key"
// * pickupInStore // * "pickupInStore"
// * shipToStore // * "shipToStore"
// * sameDayDelivery // * "sameDayDelivery"
// * nextDayDelivery // * "nextDayDelivery"
// * customFulfillment1 // * "customFulfillment1"
// * customFulfillment2 // * "customFulfillment2"
// * customFulfillment3 // * "customFulfillment3"
// * customFulfillment4 // * "customFulfillment4"
// * customFulfillment5 // * "customFulfillment5"
// //
// Numeric facet keys: // * numerical_field =
// * price // * "price"
// * discount // * "discount"
// * rating // * "rating"
// * ratingCount // * "ratingCount"
// * attributes.key // * "attributes.key"
string key = 1 [(google.api.field_behavior) = REQUIRED]; string key = 1 [(google.api.field_behavior) = REQUIRED];
// Set only if values should be bucketized into intervals. Must be set // Set only if values should be bucketized into intervals. Must be set
@ -167,7 +167,8 @@ message SearchRequest {
// order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical // order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
// intervals are sorted in the order given by // intervals are sorted in the order given by
// [FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]; // [FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals];
// [FulfillmentInfo.ids][] are sorted in the order given by // [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// are sorted in the order given by
// [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.restricted_values]. // [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.restricted_values].
string order_by = 4; string order_by = 4;
@ -289,12 +290,11 @@ message SearchRequest {
// Examples: // Examples:
// //
// * To boost products with product ID "product_1" or "product_2", and // * To boost products with product ID "product_1" or "product_2", and
// color "Red" or "Blue": // color
// ``` // "Red" or "Blue":<br>
// (id: ANY("product_1", "product_2")) // *(id: ANY("product_1", "product_2"))<br>*
// AND // *AND<br>*
// (colorFamilies: ANY("Red", "Blue")) // *(colorFamilies: ANY("Red", "Blue"))<br>*
// ```
string condition = 1; string condition = 1;
// Strength of the condition boost, which should be in [-1, 1]. Negative // Strength of the condition boost, which should be in [-1, 1]. Negative
@ -345,6 +345,11 @@ message SearchRequest {
// The condition under which query expansion should occur. Default to // The condition under which query expansion should occur. Default to
// [Condition.DISABLED][google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. // [Condition.DISABLED][google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
Condition condition = 1; Condition condition = 1;
// Whether to pin unexpanded results. If this field is set to true,
// unexpanded products are always at the top of the search results, followed
// by the expanded results.
bool pin_unexpanded_results = 2;
} }
// The relevance threshold of the search results. The higher relevance // The relevance threshold of the search results. The higher relevance
@ -433,7 +438,8 @@ message SearchRequest {
// The filter syntax consists of an expression language for constructing a // The filter syntax consists of an expression language for constructing a
// predicate from one or more fields of the products being filtered. Filter // predicate from one or more fields of the products being filtered. Filter
// expression is case-sensitive. // expression is case-sensitive. See more details at this [user
// guide](/retail/private/docs/filter-and-order#filter).
// //
// If this field is unrecognizable, an INVALID_ARGUMENT is returned. // If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string filter = 10; string filter = 10;
@ -452,7 +458,9 @@ message SearchRequest {
// The order in which products are returned. Products can be ordered by // The order in which products are returned. Products can be ordered by
// a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave // a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
// it unset if ordered by relevance. OrderBy expression is case-sensitive. // it unset if ordered by relevance. OrderBy expression is case-sensitive. See
// more details at this [user
// guide](/retail/private/docs/filter-and-order#order).
// //
// If this field is unrecognizable, an INVALID_ARGUMENT is returned. // If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string order_by = 11; string order_by = 11;
@ -466,16 +474,17 @@ message SearchRequest {
// The specification for dynamically generated facets. Notice that only // The specification for dynamically generated facets. Notice that only
// textual facets can be dynamically generated. // textual facets can be dynamically generated.
// //
// This feature requires additional allowlisting. Contact Retail Support // This feature requires additional allowlisting. Contact Retail Search
// (retail-search-support@google.com) if you are interested in using dynamic // support team if you are interested in using dynamic facet feature.
// facet feature.
DynamicFacetSpec dynamic_facet_spec = 21; DynamicFacetSpec dynamic_facet_spec = 21;
// Boost specification to boost certain products. // Boost specification to boost certain products. See more details at this
// [user guide](/retail/private/docs/boosting).
BoostSpec boost_spec = 13; BoostSpec boost_spec = 13;
// The query expansion specification that specifies the conditions under which // The query expansion specification that specifies the conditions under which
// query expansion will occur. // query expansion will occur. See more details at this [user
// guide](/retail/private/docs/result-size#query_expansion).
QueryExpansionSpec query_expansion_spec = 14; QueryExpansionSpec query_expansion_spec = 14;
// The relevance threshold of the search results. // The relevance threshold of the search results.
@ -483,7 +492,8 @@ message SearchRequest {
// Defaults to // Defaults to
// [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], // [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH],
// which means only the most relevant results are shown, and the least number // which means only the most relevant results are shown, and the least number
// of results are returned. // of results are returned. See more details at this [user
// guide](/retail/private/docs/result-size#relevance_thresholding).
RelevanceThreshold relevance_threshold = 15; RelevanceThreshold relevance_threshold = 15;
// The keys to fetch and rollup the matching // The keys to fetch and rollup the matching
@ -497,10 +507,9 @@ message SearchRequest {
// [Product][google.cloud.retail.v2alpha.Product]s attributes will lead to // [Product][google.cloud.retail.v2alpha.Product]s attributes will lead to
// extra query latency. Maximum number of keys is 10. // extra query latency. Maximum number of keys is 10.
// //
// For // For [FulfillmentInfo][google.cloud.retail.v2alpha.FulfillmentInfo], a
// [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info], // fulfillment type and a fulfillment ID must be provided in the format of
// a fulfillment type and a fulfillment ID must be provided in the format of // "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
// "fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123",
// "pickupInStore" is fulfillment type and "store123" is the store ID. // "pickupInStore" is fulfillment type and "store123" is the store ID.
// //
// Supported keys are: // Supported keys are:
@ -511,24 +520,51 @@ message SearchRequest {
// * discount // * discount
// * attributes.key, where key is any key in the // * attributes.key, where key is any key in the
// [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. // [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map.
// * pickupInStore.id, where id is any [FulfillmentInfo.ids][] for type // * pickupInStore.id, where id is any
// [FulfillmentInfo.Type.PICKUP_IN_STORE][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// * shipToStore.id, where id is any [FulfillmentInfo.ids][] for type // for
// [FulfillmentInfo.Type.SHIP_TO_STORE][]. // [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// * sameDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type // "pickup-in-store".
// [FulfillmentInfo.Type.SAME_DAY_DELIVERY][]. // * shipToStore.id, where id is any
// * nextDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type // [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// [FulfillmentInfo.Type.NEXT_DAY_DELIVERY][]. // for
// * customFulfillment1.id, where id is any [FulfillmentInfo.ids][] for type // [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// [FulfillmentInfo.Type.CUSTOM_TYPE_1][]. // "ship-to-store".
// * customFulfillment2.id, where id is any [FulfillmentInfo.ids][] for type // * sameDayDelivery.id, where id is any
// [FulfillmentInfo.Type.CUSTOM_TYPE_2][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// * customFulfillment3.id, where id is any [FulfillmentInfo.ids][] for type // for
// [FulfillmentInfo.Type.CUSTOM_TYPE_3][]. // [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// * customFulfillment4.id, where id is any [FulfillmentInfo.ids][] for type // "same-day-delivery".
// [FulfillmentInfo.Type.CUSTOM_TYPE_4][]. // * nextDayDelivery.id, where id is any
// * customFulfillment5.id, where id is any [FulfillmentInfo.ids][] for type // [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// [FulfillmentInfo.Type.CUSTOM_TYPE_5][]. // for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "next-day-delivery".
// * customFulfillment1.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-1".
// * customFulfillment2.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-2".
// * customFulfillment3.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-3".
// * customFulfillment4.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-4".
// * customFulfillment5.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-5".
// //
// If this field is set to an invalid value other than these, an // If this field is set to an invalid value other than these, an
// INVALID_ARGUMENT error is returned. // INVALID_ARGUMENT error is returned.
@ -620,9 +656,8 @@ message SearchResponse {
// } // }
// } // }
// //
// For // For [FulfillmentInfo][google.cloud.retail.v2alpha.FulfillmentInfo], the
// [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info], // rollup values is a double value with type
// the rollup values is a double value with type
// [google.protobuf.Value][google.protobuf.Value]. For example, // [google.protobuf.Value][google.protobuf.Value]. For example,
// `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there // `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
// are 10 variants in this product are available in the store "store1". // are 10 variants in this product are available in the store "store1".
@ -662,6 +697,11 @@ message SearchResponse {
message QueryExpansionInfo { message QueryExpansionInfo {
// Bool describing whether query expansion has occurred. // Bool describing whether query expansion has occurred.
bool expanded_query = 1; bool expanded_query = 1;
// Number of pinned results. This field will only be set when expansion
// happens and [SearchRequest.query_expansion_spec.pin_unexpanded_results][]
// is set to true.
int64 pinned_result_count = 2;
} }
// A list of matched items. The order represents the ranking. // A list of matched items. The order represents the ranking.

@ -261,9 +261,21 @@ message UserEvent {
message ProductDetail { message ProductDetail {
// Required. [Product][google.cloud.retail.v2alpha.Product] information. // Required. [Product][google.cloud.retail.v2alpha.Product] information.
// //
// Only [Product.id][google.cloud.retail.v2alpha.Product.id] field is used // Required field(s):
// when ingesting an event, all other product fields are ignored as we will //
// look them up from the catalog. // * [Product.id][google.cloud.retail.v2alpha.Product.id]
//
// Optional override field(s):
//
// * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
//
// If any supported optional fields are provided, we will treat them as a full
// override when looking up product information from the catalog. Thus, it is
// important to ensure that the overriding fields are accurate and
// complete.
//
// All other product fields are ignored and instead populated via catalog
// lookup after event ingestion.
Product product = 1 [(google.api.field_behavior) = REQUIRED]; Product product = 1 [(google.api.field_behavior) = REQUIRED];
// Quantity of the product associated with the user event. // Quantity of the product associated with the user event.

@ -93,8 +93,8 @@ service CatalogService {
// {newBranch}. // {newBranch}.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc SetDefaultBranch(SetDefaultBranchRequest) rpc SetDefaultBranch(SetDefaultBranchRequest)
returns (google.protobuf.Empty) { returns (google.protobuf.Empty) {
option (google.api.http) = { option (google.api.http) = {
@ -109,8 +109,8 @@ service CatalogService {
// method under a specified parent catalog. // method under a specified parent catalog.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc GetDefaultBranch(GetDefaultBranchRequest) rpc GetDefaultBranch(GetDefaultBranchRequest)
returns (GetDefaultBranchResponse) { returns (GetDefaultBranchResponse) {
option (google.api.http) = { option (google.api.http) = {

@ -36,8 +36,8 @@ option ruby_package = "Google::Cloud::Retail::V2beta";
// Auto-completion service for retail. // Auto-completion service for retail.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
service CompletionService { service CompletionService {
option (google.api.default_host) = "retail.googleapis.com"; option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) = option (google.api.oauth_scopes) =
@ -46,8 +46,8 @@ service CompletionService {
// Completes the specified prefix with keyword suggestions. // Completes the specified prefix with keyword suggestions.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
option (google.api.http) = { option (google.api.http) = {
get: "/v2beta/{catalog=projects/*/locations/*/catalogs/*}:completeQuery" get: "/v2beta/{catalog=projects/*/locations/*/catalogs/*}:completeQuery"
@ -59,8 +59,8 @@ service CompletionService {
// Request processing may be synchronous. Partial updating is not supported. // Request processing may be synchronous. Partial updating is not supported.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc ImportCompletionData(ImportCompletionDataRequest) rpc ImportCompletionData(ImportCompletionDataRequest)
returns (google.longrunning.Operation) { returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {
@ -135,13 +135,15 @@ message CompleteQueryRequest {
// * user-data // * user-data
// //
// * cloud-retail // * cloud-retail
// This option is not automatically enabled. Before using cloud-retail, // This option requires additional allowlisting. Before using cloud-retail,
// contact retail-search-support@google.com first. // contact Cloud Retail support team first.
string dataset = 6; string dataset = 6;
// Completion max suggestions. // Completion max suggestions. If left unset or set to 0, then will fallback
// to the configured value [CompletionConfig.max_suggestions][].
// //
// The maximum allowed max suggestions is 20. The default value is 20. // The maximum allowed max suggestions is 20. If it is set higher, it will be
// capped by 20.
int32 max_suggestions = 5; int32 max_suggestions = 5;
} }
@ -172,9 +174,9 @@ message CompleteQueryResponse {
// performance. // performance.
string attribution_token = 2; string attribution_token = 2;
// Matched recent searches of this user. This field is a restricted feature. // Matched recent searches of this user. The maximum number of recent searches
// Contact Retail Support (retail-search-support@google.com) if you are // is 10. This field is a restricted feature. Contact Retail Search support
// interested in enabling it. // team if you are interested in enabling it.
// //
// This feature is only available when // This feature is only available when
// [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id] // [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]

@ -160,13 +160,13 @@ message ImportProductsRequest {
// Can only be while using // Can only be while using
// [BigQuerySource][google.cloud.retail.v2beta.BigQuerySource]. // [BigQuerySource][google.cloud.retail.v2beta.BigQuerySource].
// //
// Add the IAM permission BigQuery Data Viewer for // Add the IAM permission "BigQuery Data Viewer" for
// cloud-retail-customer-data-access@system.gserviceaccount.com before // cloud-retail-customer-data-access@system.gserviceaccount.com before
// using this feature otherwise an error is thrown. // using this feature otherwise an error is thrown.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
FULL = 2; FULL = 2;
} }
@ -303,7 +303,7 @@ message CompletionDataInputConfig {
oneof source { oneof source {
// Required. BigQuery input source. // Required. BigQuery input source.
// //
// Add the IAM permission BigQuery Data Viewer for // Add the IAM permission "BigQuery Data Viewer" for
// cloud-retail-customer-data-access@system.gserviceaccount.com before // cloud-retail-customer-data-access@system.gserviceaccount.com before
// using this feature otherwise an error is thrown. // using this feature otherwise an error is thrown.
BigQuerySource big_query_source = 1 BigQuerySource big_query_source = 1

@ -315,13 +315,9 @@ message Product {
// This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT // This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
// error is returned: // error is returned:
// //
// * Max entries count: 200 by default; 100 for // * Max entries count: 200.
// [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT].
// * The key must be a UTF-8 encoded string with a length limit of 128 // * The key must be a UTF-8 encoded string with a length limit of 128
// characters. // characters.
// * Max indexable entries count: 200 by default; 40 for
// [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT].
// * Max searchable entries count: 30.
// * For indexable attribute, the key must match the pattern: // * For indexable attribute, the key must match the pattern:
// [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS. // [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS.
map<string, CustomAttribute> attributes = 12; map<string, CustomAttribute> attributes = 12;
@ -431,7 +427,7 @@ message Product {
// The material of the product. For example, "leather", "wooden". // The material of the product. For example, "leather", "wooden".
// //
// A maximum of 5 values are allowed. Each value must be a UTF-8 encoded // A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
// string with a length limit of 128 characters. Otherwise, an // string with a length limit of 128 characters. Otherwise, an
// INVALID_ARGUMENT error is returned. // INVALID_ARGUMENT error is returned.
// //
@ -532,8 +528,12 @@ message Product {
// * [name][google.cloud.retail.v2beta.Product.name] // * [name][google.cloud.retail.v2beta.Product.name]
// * [color_info][google.cloud.retail.v2beta.Product.color_info] // * [color_info][google.cloud.retail.v2beta.Product.color_info]
// //
// Maximum number of paths is 20. Otherwise, an INVALID_ARGUMENT error is // Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
// returned. // returned.
//
// Note: Returning more fields in
// [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase
// response payload size and serving latency.
google.protobuf.FieldMask retrievable_fields = 30; google.protobuf.FieldMask retrievable_fields = 30;
// Output only. Product variants grouped together on primary product which // Output only. Product variants grouped together on primary product which

@ -145,8 +145,8 @@ service ProductService {
// [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. // [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) { rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {
post: "/v2beta/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory" post: "/v2beta/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory"
@ -172,8 +172,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. // [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest) rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest)
returns (google.longrunning.Operation) { returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {
@ -200,8 +200,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. // [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest) rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest)
returns (google.longrunning.Operation) { returns (google.longrunning.Operation) {
option (google.api.http) = { option (google.api.http) = {

@ -39,8 +39,8 @@ option ruby_package = "Google::Cloud::Retail::V2beta";
// Service for search. // Service for search.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
service SearchService { service SearchService {
option (google.api.default_host) = "retail.googleapis.com"; option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) = option (google.api.oauth_scopes) =
@ -49,8 +49,8 @@ service SearchService {
// Performs a search. // Performs a search.
// //
// This feature is only available for users who have Retail Search enabled. // This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are // Please submit a form [here](https://cloud.google.com/contact) to contact
// interested in using Retail Search. // cloud sales if you are interested in using Retail Search.
rpc Search(SearchRequest) returns (SearchResponse) { rpc Search(SearchRequest) returns (SearchResponse) {
option (google.api.http) = { option (google.api.http) = {
post: "/v2beta/{placement=projects/*/locations/*/catalogs/*/placements/*}:search" post: "/v2beta/{placement=projects/*/locations/*/catalogs/*/placements/*}:search"
@ -68,42 +68,42 @@ message SearchRequest {
// Specifies how a facet is computed. // Specifies how a facet is computed.
message FacetKey { message FacetKey {
// Required. Supported textual and numerical facet keys in // Required. Supported textual and numerical facet keys in
// [Product][google.cloud.retail.v2beta.Product] object, over which the // [Product][google.cloud.retail.v2.Product] object, over which the facet
// facet values are computed. Facet key is case-sensitive. // values are computed. Facet key is case-sensitive.
// //
// Allowed facet keys when // Allowed facet keys when
// [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query] // [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
// is not specified: // is not specified:
// //
// Textual facet keys: // * textual_field =
// * brands // * "brands"
// * categories // * "categories"
// * genders // * "genders"
// * ageGroups // * "ageGroups"
// * availability // * "availability"
// * colorFamilies // * "colorFamilies"
// * colors // * "colors"
// * sizes // * "sizes"
// * materials // * "materials"
// * patterns // * "patterns"
// * conditions // * "conditions"
// * attributes.key // * "attributes.key"
// * pickupInStore // * "pickupInStore"
// * shipToStore // * "shipToStore"
// * sameDayDelivery // * "sameDayDelivery"
// * nextDayDelivery // * "nextDayDelivery"
// * customFulfillment1 // * "customFulfillment1"
// * customFulfillment2 // * "customFulfillment2"
// * customFulfillment3 // * "customFulfillment3"
// * customFulfillment4 // * "customFulfillment4"
// * customFulfillment5 // * "customFulfillment5"
// //
// Numeric facet keys: // * numerical_field =
// * price // * "price"
// * discount // * "discount"
// * rating // * "rating"
// * ratingCount // * "ratingCount"
// * attributes.key // * "attributes.key"
string key = 1 [(google.api.field_behavior) = REQUIRED]; string key = 1 [(google.api.field_behavior) = REQUIRED];
// Set only if values should be bucketized into intervals. Must be set // Set only if values should be bucketized into intervals. Must be set
@ -167,7 +167,8 @@ message SearchRequest {
// order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical // order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
// intervals are sorted in the order given by // intervals are sorted in the order given by
// [FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]; // [FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals];
// [FulfillmentInfo.ids][] are sorted in the order given by // [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// are sorted in the order given by
// [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.restricted_values]. // [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.restricted_values].
string order_by = 4; string order_by = 4;
@ -289,12 +290,11 @@ message SearchRequest {
// Examples: // Examples:
// //
// * To boost products with product ID "product_1" or "product_2", and // * To boost products with product ID "product_1" or "product_2", and
// color "Red" or "Blue": // color
// ``` // "Red" or "Blue":<br>
// (id: ANY("product_1", "product_2")) // *(id: ANY("product_1", "product_2"))<br>*
// AND // *AND<br>*
// (colorFamilies: ANY("Red", "Blue")) // *(colorFamilies: ANY("Red", "Blue"))<br>*
// ```
string condition = 1; string condition = 1;
// Strength of the condition boost, which should be in [-1, 1]. Negative // Strength of the condition boost, which should be in [-1, 1]. Negative
@ -345,6 +345,11 @@ message SearchRequest {
// The condition under which query expansion should occur. Default to // The condition under which query expansion should occur. Default to
// [Condition.DISABLED][google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. // [Condition.DISABLED][google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
Condition condition = 1; Condition condition = 1;
// Whether to pin unexpanded results. If this field is set to true,
// unexpanded products are always at the top of the search results, followed
// by the expanded results.
bool pin_unexpanded_results = 2;
} }
// Required. The resource name of the search engine placement, such as // Required. The resource name of the search engine placement, such as
@ -411,7 +416,8 @@ message SearchRequest {
// The filter syntax consists of an expression language for constructing a // The filter syntax consists of an expression language for constructing a
// predicate from one or more fields of the products being filtered. Filter // predicate from one or more fields of the products being filtered. Filter
// expression is case-sensitive. // expression is case-sensitive. See more details at this [user
// guide](/retail/private/docs/filter-and-order#filter).
// //
// If this field is unrecognizable, an INVALID_ARGUMENT is returned. // If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string filter = 10; string filter = 10;
@ -429,7 +435,9 @@ message SearchRequest {
// The order in which products are returned. Products can be ordered by // The order in which products are returned. Products can be ordered by
// a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave // a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
// it unset if ordered by relevance. OrderBy expression is case-sensitive. // it unset if ordered by relevance. OrderBy expression is case-sensitive. See
// more details at this [user
// guide](/retail/private/docs/filter-and-order#order).
// //
// If this field is unrecognizable, an INVALID_ARGUMENT is returned. // If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string order_by = 11; string order_by = 11;
@ -443,16 +451,17 @@ message SearchRequest {
// The specification for dynamically generated facets. Notice that only // The specification for dynamically generated facets. Notice that only
// textual facets can be dynamically generated. // textual facets can be dynamically generated.
// //
// This feature requires additional allowlisting. Contact Retail Support // This feature requires additional allowlisting. Contact Retail Search
// (retail-search-support@google.com) if you are interested in using dynamic // support team if you are interested in using dynamic facet feature.
// facet feature.
DynamicFacetSpec dynamic_facet_spec = 21; DynamicFacetSpec dynamic_facet_spec = 21;
// Boost specification to boost certain products. // Boost specification to boost certain products. See more details at this
// [user guide](/retail/private/docs/boosting).
BoostSpec boost_spec = 13; BoostSpec boost_spec = 13;
// The query expansion specification that specifies the conditions under which // The query expansion specification that specifies the conditions under which
// query expansion will occur. // query expansion will occur. See more details at this [user
// guide](/retail/private/docs/result-size#query_expansion).
QueryExpansionSpec query_expansion_spec = 14; QueryExpansionSpec query_expansion_spec = 14;
// The keys to fetch and rollup the matching // The keys to fetch and rollup the matching
@ -466,10 +475,9 @@ message SearchRequest {
// [Product][google.cloud.retail.v2beta.Product]s attributes will lead to // [Product][google.cloud.retail.v2beta.Product]s attributes will lead to
// extra query latency. Maximum number of keys is 10. // extra query latency. Maximum number of keys is 10.
// //
// For // For [FulfillmentInfo][google.cloud.retail.v2beta.FulfillmentInfo], a
// [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info], // fulfillment type and a fulfillment ID must be provided in the format of
// a fulfillment type and a fulfillment ID must be provided in the format of // "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
// "fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123",
// "pickupInStore" is fulfillment type and "store123" is the store ID. // "pickupInStore" is fulfillment type and "store123" is the store ID.
// //
// Supported keys are: // Supported keys are:
@ -480,24 +488,42 @@ message SearchRequest {
// * discount // * discount
// * attributes.key, where key is any key in the // * attributes.key, where key is any key in the
// [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. // [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map.
// * pickupInStore.id, where id is any [FulfillmentInfo.ids][] for type // * pickupInStore.id, where id is any
// [FulfillmentInfo.Type.PICKUP_IN_STORE][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// * shipToStore.id, where id is any [FulfillmentInfo.ids][] for type // for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// [FulfillmentInfo.Type.SHIP_TO_STORE][]. // "pickup-in-store".
// * sameDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type // * shipToStore.id, where id is any
// [FulfillmentInfo.Type.SAME_DAY_DELIVERY][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// * nextDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type // for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// [FulfillmentInfo.Type.NEXT_DAY_DELIVERY][]. // "ship-to-store".
// * customFulfillment1.id, where id is any [FulfillmentInfo.ids][] for type // * sameDayDelivery.id, where id is any
// [FulfillmentInfo.Type.CUSTOM_TYPE_1][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// * customFulfillment2.id, where id is any [FulfillmentInfo.ids][] for type // for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// [FulfillmentInfo.Type.CUSTOM_TYPE_2][]. // "same-day-delivery".
// * customFulfillment3.id, where id is any [FulfillmentInfo.ids][] for type // * nextDayDelivery.id, where id is any
// [FulfillmentInfo.Type.CUSTOM_TYPE_3][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// * customFulfillment4.id, where id is any [FulfillmentInfo.ids][] for type // for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// [FulfillmentInfo.Type.CUSTOM_TYPE_4][]. // "next-day-delivery".
// * customFulfillment5.id, where id is any [FulfillmentInfo.ids][] for type // * customFulfillment1.id, where id is any
// [FulfillmentInfo.Type.CUSTOM_TYPE_5][]. // [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-1".
// * customFulfillment2.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-2".
// * customFulfillment3.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-3".
// * customFulfillment4.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-4".
// * customFulfillment5.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-5".
// //
// If this field is set to an invalid value other than these, an // If this field is set to an invalid value other than these, an
// INVALID_ARGUMENT error is returned. // INVALID_ARGUMENT error is returned.
@ -589,9 +615,8 @@ message SearchResponse {
// } // }
// } // }
// //
// For // For [FulfillmentInfo][google.cloud.retail.v2beta.FulfillmentInfo], the
// [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info], // rollup values is a double value with type
// the rollup values is a double value with type
// [google.protobuf.Value][google.protobuf.Value]. For example, // [google.protobuf.Value][google.protobuf.Value]. For example,
// `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there // `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
// are 10 variants in this product are available in the store "store1". // are 10 variants in this product are available in the store "store1".
@ -631,6 +656,11 @@ message SearchResponse {
message QueryExpansionInfo { message QueryExpansionInfo {
// Bool describing whether query expansion has occurred. // Bool describing whether query expansion has occurred.
bool expanded_query = 1; bool expanded_query = 1;
// Number of pinned results. This field will only be set when expansion
// happens and [SearchRequest.query_expansion_spec.pin_unexpanded_results][]
// is set to true.
int64 pinned_result_count = 2;
} }
// A list of matched items. The order represents the ranking. // A list of matched items. The order represents the ranking.

@ -259,9 +259,21 @@ message UserEvent {
message ProductDetail { message ProductDetail {
// Required. [Product][google.cloud.retail.v2beta.Product] information. // Required. [Product][google.cloud.retail.v2beta.Product] information.
// //
// Only [Product.id][google.cloud.retail.v2beta.Product.id] field is used when // Required field(s):
// ingesting an event, all other product fields are ignored as we will look //
// them up from the catalog. // * [Product.id][google.cloud.retail.v2beta.Product.id]
//
// Optional override field(s):
//
// * [Product.price_info][google.cloud.retail.v2beta.Product.price_info]
//
// If any supported optional fields are provided, we will treat them as a full
// override when looking up product information from the catalog. Thus, it is
// important to ensure that the overriding fields are accurate and
// complete.
//
// All other product fields are ignored and instead populated via catalog
// lookup after event ingestion.
Product product = 1 [(google.api.field_behavior) = REQUIRED]; Product product = 1 [(google.api.field_behavior) = REQUIRED];
// Quantity of the product associated with the user event. // Quantity of the product associated with the user event.

Loading…
Cancel
Save