CompletionConfig
Stay organized with collections
Save and categorize content based on your preferences.
Config to customize Autocomplete API response for both engines and data stores. Some fields are applicable to only one of them.
JSON representation |
{
"name": string,
"matchingOrder": string,
"maxSuggestions": integer,
"minPrefixLength": integer,
"queryModel": string,
"enableMode": enum (EnableMode )
} |
Fields |
name |
string
Required. Immutable. Fully qualified name projects/*/locations/*/dataStores/*/completionConfig projects/*/locations/*/collections/*/dataStores/*/completionConfig projects/*/locations/*/collections/*/engines/*/completionConfig
|
matchingOrder |
string
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 .
|
maxSuggestions |
integer
The maximum number of autocomplete suggestions returned per term. maxSuggestions must lie within the range of [1, 20]. If not set or set to 0, it will be set to the default of 20 suggestions.
|
minPrefixLength |
integer
The minimum number of characters needed to be typed in order to get suggestions. minPrefixLength must lie within the range of [1, 20]. If not set or set to 0, it will be set to the default of 1 character.
|
queryModel |
string
The data model of query suggestions for serving. Currently supported values:
automatic - autocomplete backend automatic selects or mixes suggestions from different models.
document - Using suggestions generated from user-imported documents.
search-history - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API.
user-event - Using suggestions generated from user-imported search events.
document-completable - Using suggestions taken directly from user-imported document fields marked as completable.
If query model is empty, the serving applies the "automatic" model by default.
|
enableMode |
enum (EnableMode )
The enable mode of autocomplete generation pipelines. If this field is unset, the server behavior defaults to CompletionConfig.EnableMode.AUTOMATIC . Applies to DataStore only. Ignored for Engine.
|
EnableMode
Specifies the enable mode of autocomplete generation pipelines.
Enums |
ENABLE_MODE_UNSPECIFIED |
When AutoComplete enable mode unspecified, it defaults to AUTOMATIC mode. |
AUTOMATIC |
AutoComplete will be enabled when the data store meets criteria. |
MANUAL |
AutoComplete will be enabled regardless of UCS data requirements. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-03 UTC."],[[["This document describes the configuration options for customizing the Autocomplete API response for both engines and data stores, highlighting fields applicable to each."],["The `CompletionConfig` JSON representation includes properties like `name`, `matchingOrder`, `maxSuggestions`, `minPrefixLength`, `queryModel`, and `enableMode` to define how suggestions are generated and displayed."],["`matchingOrder` allows you to define the order of suggestions, supporting values like `out-of-order` and `exact-prefix`, with the latter being the default."],["The `queryModel` field allows you to choose the data source for suggestions, with options like `automatic`, `document`, `search-history`, `user-event`, and `document-completable`."],["`enableMode`, applicable only to DataStores, determines how autocomplete generation pipelines are activated, with `AUTOMATIC` and `MANUAL` modes available."]]],[]]