public sealed class AdvancedCompleteQueryRequest : IMessage<AdvancedCompleteQueryRequest>, IEquatable<AdvancedCompleteQueryRequest>, IDeepCloneable<AdvancedCompleteQueryRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1beta API class AdvancedCompleteQueryRequest.
Request message for
[CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery]
method.
.
Required. The completion_config of the parent dataStore or engine resource
name for which the completion is performed, such as
projects/*/locations/global/collections/default_collection/dataStores/*/completionConfigprojects/*/locations/global/collections/default_collection/engines/*/completionConfig.
Indicates if tail suggestions should be returned if there are no
suggestions that match the full query. Even if set to true, if there are
suggestions that match the full query, those are returned and no
tail suggestions are returned.
Required. The typeahead input used to fetch suggestions. Maximum length is
128 characters.
The query can not be empty for most of the suggestion types. If it is
empty, an INVALID_ARGUMENT error is returned. The exception is when the
suggestion_types contains only the type RECENT_SEARCH, the query can
be an empty string. The is called "zero prefix" feature, which returns
user's recently searched queries given the empty query.
Specifies the autocomplete data model. This overrides any model specified
in the Configuration > Autocomplete section of the Cloud console. Currently
supported values:
document - Using suggestions generated from user-imported documents.
search-history - Using suggestions generated from the past history of
[SearchService.Search][google.cloud.discoveryengine.v1beta.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.
Default values:
document is the default model for regular dataStores.
search-history is the default model for site search dataStores.
This should be the same identifier information as
[UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
and
[SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
A unique identifier for tracking visitors. For example, this could be
implemented with an HTTP cookie, which should be able to uniquely identify
a visitor on a single device. This unique identifier should not change if
the visitor logs in or out of the website.
This field should NOT have a fixed value such as unknown_visitor.
This should be the same identifier as
[UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
and
[SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
The field must be a UTF-8 encoded string with a length limit of 128
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eAdvancedCompleteQueryRequest\u003c/code\u003e class within the Discovery Engine v1beta API, which is used to send requests for the \u003ccode\u003eCompletionService.AdvancedCompleteQuery\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAdvancedCompleteQueryRequest\u003c/code\u003e class is part of the \u003ccode\u003eGoogle.Cloud.DiscoveryEngine.V1Beta\u003c/code\u003e namespace and is found in the \u003ccode\u003eGoogle.Cloud.DiscoveryEngine.V1Beta.dll\u003c/code\u003e assembly, and it inherits from the base object class while implementing multiple interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eAdvancedCompleteQueryRequest\u003c/code\u003e class include \u003ccode\u003eBoostSpec\u003c/code\u003e, \u003ccode\u003eCompletionConfig\u003c/code\u003e, \u003ccode\u003eIncludeTailSuggestions\u003c/code\u003e, \u003ccode\u003eQuery\u003c/code\u003e, \u003ccode\u003eQueryModel\u003c/code\u003e, \u003ccode\u003eSuggestionTypes\u003c/code\u003e, \u003ccode\u003eUserInfo\u003c/code\u003e, and \u003ccode\u003eUserPseudoId\u003c/code\u003e, each serving to configure and refine the query for suggestions.\u003c/p\u003e\n"],["\u003cp\u003eThe class has two constructors, a parameterless constructor, and one that accepts another \u003ccode\u003eAdvancedCompleteQueryRequest\u003c/code\u003e instance for cloning, allowing for the creation of new instances, with or without the use of an existing query request as a base.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAdvancedCompleteQueryRequest\u003c/code\u003e allows for the specification of the autocomplete data model through its \u003ccode\u003eQueryModel\u003c/code\u003e property, supporting models like 'document', 'search-history', 'user-event', and 'document-completable' to tailor the suggestion source, and also allows you to specify what suggestion types to return with its \u003ccode\u003eSuggestionTypes\u003c/code\u003e property.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class AdvancedCompleteQueryRequest (1.0.0-beta19)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta19 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest) \n\n public sealed class AdvancedCompleteQueryRequest : IMessage\u003cAdvancedCompleteQueryRequest\u003e, IEquatable\u003cAdvancedCompleteQueryRequest\u003e, IDeepCloneable\u003cAdvancedCompleteQueryRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1beta API class AdvancedCompleteQueryRequest.\n\nRequest message for\n\\[CompletionService.AdvancedCompleteQuery\\]\\[google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery\\]\nmethod.\n. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AdvancedCompleteQueryRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AdvancedCompleteQueryRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AdvancedCompleteQueryRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AdvancedCompleteQueryRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1Beta](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1Beta.dll\n\nConstructors\n------------\n\n### AdvancedCompleteQueryRequest()\n\n public AdvancedCompleteQueryRequest()\n\n### AdvancedCompleteQueryRequest(AdvancedCompleteQueryRequest)\n\n public AdvancedCompleteQueryRequest(AdvancedCompleteQueryRequest other)\n\nProperties\n----------\n\n### BoostSpec\n\n public AdvancedCompleteQueryRequest.Types.BoostSpec BoostSpec { get; set; }\n\nOptional. Specification to boost suggestions matching the condition.\n\n### CompletionConfig\n\n public string CompletionConfig { get; set; }\n\nRequired. The completion_config of the parent dataStore or engine resource\nname for which the completion is performed, such as\n`projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`\n`projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.\n\n### CompletionConfigAsCompletionConfigName\n\n public CompletionConfigName CompletionConfigAsCompletionConfigName { get; set; }\n\n[CompletionConfigName](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CompletionConfigName)-typed view over the [CompletionConfig](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest#Google_Cloud_DiscoveryEngine_V1Beta_AdvancedCompleteQueryRequest_CompletionConfig) resource name\nproperty.\n\n### IncludeTailSuggestions\n\n public bool IncludeTailSuggestions { get; set; }\n\nIndicates if tail suggestions should be returned if there are no\nsuggestions that match the full query. Even if set to true, if there are\nsuggestions that match the full query, those are returned and no\ntail suggestions are returned.\n\n### Query\n\n public string Query { get; set; }\n\nRequired. The typeahead input used to fetch suggestions. Maximum length is\n128 characters.\n\nThe query can not be empty for most of the suggestion types. If it is\nempty, an `INVALID_ARGUMENT` error is returned. The exception is when the\nsuggestion_types contains only the type `RECENT_SEARCH`, the query can\nbe an empty string. The is called \"zero prefix\" feature, which returns\nuser's recently searched queries given the empty query.\n\n### QueryModel\n\n public string QueryModel { get; set; }\n\nSpecifies the autocomplete data model. This overrides any model specified\nin the Configuration \\\u003e Autocomplete section of the Cloud console. Currently\nsupported values:\n\n- `document` - Using suggestions generated from user-imported documents.\n- `search-history` - Using suggestions generated from the past history of \\[SearchService.Search\\]\\[google.cloud.discoveryengine.v1beta.SearchService.Search\\] API calls. Do not use it when there is no traffic for Search API.\n- `user-event` - Using suggestions generated from user-imported search events.\n- `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable.\n\nDefault values:\n\n- `document` is the default model for regular dataStores.\n- `search-history` is the default model for site search dataStores.\n\n### SuggestionTypes\n\n public RepeatedField\u003cAdvancedCompleteQueryRequest.Types.SuggestionType\u003e SuggestionTypes { get; }\n\nOptional. Suggestion types to return. If empty or unspecified, query\nsuggestions are returned. Only one suggestion type is supported at the\nmoment.\n\n### UserInfo\n\n public UserInfo UserInfo { get; set; }\n\nOptional. Information about the end user.\n\nThis should be the same identifier information as\n\\[UserEvent.user_info\\]\\[google.cloud.discoveryengine.v1beta.UserEvent.user_info\\]\nand\n\\[SearchRequest.user_info\\]\\[google.cloud.discoveryengine.v1beta.SearchRequest.user_info\\].\n\n### UserPseudoId\n\n public string UserPseudoId { get; set; }\n\nA unique identifier for tracking visitors. For example, this could be\nimplemented with an HTTP cookie, which should be able to uniquely identify\na visitor on a single device. This unique identifier should not change if\nthe visitor logs in or out of the website.\n\nThis field should NOT have a fixed value such as `unknown_visitor`.\n\nThis should be the same identifier as\n\\[UserEvent.user_pseudo_id\\]\\[google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id\\]\nand\n\\[SearchRequest.user_pseudo_id\\]\\[google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id\\].\n\nThe field must be a UTF-8 encoded string with a length limit of 128"]]