public sealed class AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec : IMessage<AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec>, IEquatable<AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec>, IDeepCloneable<AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1beta API class AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec.
Boost applies to suggestions which match a condition.
An expression which specifies a boost condition. The syntax is the same
as filter expression
syntax.
Currently, the only supported condition is a list of BCP-47 lang codes.
Example:
To boost suggestions in languages en or fr:
(lang_code: ANY("en", "fr"))
[[["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\u003eConditionBoostSpec\u003c/code\u003e class within the Discovery Engine v1beta API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConditionBoostSpec\u003c/code\u003e class is used to apply boosts to suggestions that match specific conditions.\u003c/p\u003e\n"],["\u003cp\u003eIt allows setting a boost value between -1 and 1, where negative values demote suggestions, and positive values promote them.\u003c/p\u003e\n"],["\u003cp\u003eConditions are specified using filter expression syntax, supporting the boosting of suggestions based on languages via BCP-47 language codes.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements interfaces such as IMessage, IEquatable, IDeepCloneable and IBufferMessage, while also inheriting from the base object.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec (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.Types.BoostSpec.Types.ConditionBoostSpec)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec) \n\n public sealed class AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec : IMessage\u003cAdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec\u003e, IEquatable\u003cAdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec\u003e, IDeepCloneable\u003cAdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1beta API class AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec.\n\nBoost applies to suggestions which match a condition. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec \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)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types)[BoostSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec.Types)[ConditionBoostSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AdvancedCompleteQueryRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types)[BoostSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec.Types)[ConditionBoostSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec), [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)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types)[BoostSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec.Types)[ConditionBoostSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec), [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### ConditionBoostSpec()\n\n public ConditionBoostSpec()\n\n### ConditionBoostSpec(ConditionBoostSpec)\n\n public ConditionBoostSpec(AdvancedCompleteQueryRequest.Types.BoostSpec.Types.ConditionBoostSpec other)\n\nProperties\n----------\n\n### Boost\n\n public float Boost { get; set; }\n\nStrength of the boost, which should be in \\[-1, 1\\].\nNegative boost means demotion. Default is 0.0.\n\nSetting to 1.0 gives the suggestions a big promotion. However, it does\nnot necessarily mean that the top result will be a boosted suggestion.\n\nSetting to -1.0 gives the suggestions a big demotion. However, other\nsuggestions that are relevant might still be shown.\n\nSetting to 0.0 means no boost applied. The boosting condition is\nignored.\n\n### Condition\n\n public string Condition { get; set; }\n\nAn expression which specifies a boost condition. The syntax is the same\nas [filter expression\nsyntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).\nCurrently, the only supported condition is a list of BCP-47 lang codes.\n\nExample:\n\n- To boost suggestions in languages `en` or `fr`: `(lang_code: ANY(\"en\", \"fr\"))`"]]