Skip to main content

catalogs_completion_config

Creates, updates, deletes, gets or lists a catalogs_completion_config resource.

Overview

Namecatalogs_completion_config
TypeResource
Idgoogle.retail.catalogs_completion_config

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig
allowlistInputConfigobjectOutput only. The source data for the latest import of the autocomplete allowlist phrases. (id: GoogleCloudRetailV2CompletionDataInputConfig)
autoLearningbooleanIf set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use cloud-retail data in CompleteQueryRequest.
denylistInputConfigobjectOutput only. The source data for the latest import of the autocomplete denylist phrases. (id: GoogleCloudRetailV2CompletionDataInputConfig)
lastAllowlistImportOperationstringOutput only. Name of the LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.
lastDenylistImportOperationstringOutput only. Name of the LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.
lastSuggestionsImportOperationstringOutput only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API method to retrieve the latest state of the Long Running Operation.
matchingOrderstringSpecifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest "women's shoes", whereas a query of 'red s' with 'exact-prefix' specified would suggest "red shoes". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'.
maxSuggestionsinteger (int32)The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.
minPrefixLengthinteger (int32)The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.
suggestionsInputConfigobjectOutput only. The source data for the latest import of the autocomplete suggestion phrases. (id: GoogleCloudRetailV2CompletionDataInputConfig)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_catalogs_get_completion_configselectprojectsId, locationsId, catalogsIdGets a CompletionConfig.
projects_locations_catalogs_update_completion_configupdateprojectsId, locationsId, catalogsIdupdateMaskUpdates the CompletionConfigs.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
catalogsIdstring
locationsIdstring
projectsIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets a CompletionConfig.

SELECT
name,
allowlistInputConfig,
autoLearning,
denylistInputConfig,
lastAllowlistImportOperation,
lastDenylistImportOperation,
lastSuggestionsImportOperation,
matchingOrder,
maxSuggestions,
minPrefixLength,
suggestionsInputConfig
FROM google.retail.catalogs_completion_config
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND catalogsId = '{{ catalogsId }}' -- required;

UPDATE examples

Updates the CompletionConfigs.

UPDATE google.retail.catalogs_completion_config
SET
data__name = '{{ name }}',
data__matchingOrder = '{{ matchingOrder }}',
data__maxSuggestions = {{ maxSuggestions }},
data__minPrefixLength = {{ minPrefixLength }},
data__autoLearning = {{ autoLearning }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND catalogsId = '{{ catalogsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
allowlistInputConfig,
autoLearning,
denylistInputConfig,
lastAllowlistImportOperation,
lastDenylistImportOperation,
lastSuggestionsImportOperation,
matchingOrder,
maxSuggestions,
minPrefixLength,
suggestionsInputConfig;