public static final class SearchRequest.BoostSpec.ConditionBoostSpec.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder> implements SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder
Boost applies to documents which match a condition.Protobuf type
google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpecgetAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic SearchRequest.BoostSpec.ConditionBoostSpec build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic SearchRequest.BoostSpec.ConditionBoostSpec buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic SearchRequest.BoostSpec.ConditionBoostSpec.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec.Builder mergeFrom(SearchRequest.BoostSpec.ConditionBoostSpec other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public SearchRequest.BoostSpec.ConditionBoostSpec.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>IOExceptionpublic String getCondition()
An expression which specifies a boost condition. The syntax and
supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost documents with document ID "doc_1" or "doc_2", and
color "Red" or "Blue":
`(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
string condition = 1;getCondition in interface SearchRequest.BoostSpec.ConditionBoostSpecOrBuilderpublic com.google.protobuf.ByteString getConditionBytes()
An expression which specifies a boost condition. The syntax and
supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost documents with document ID "doc_1" or "doc_2", and
color "Red" or "Blue":
`(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
string condition = 1;getConditionBytes in interface SearchRequest.BoostSpec.ConditionBoostSpecOrBuilderpublic SearchRequest.BoostSpec.ConditionBoostSpec.Builder setCondition(String value)
An expression which specifies a boost condition. The syntax and
supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost documents with document ID "doc_1" or "doc_2", and
color "Red" or "Blue":
`(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
string condition = 1;value - The condition to set.public SearchRequest.BoostSpec.ConditionBoostSpec.Builder clearCondition()
An expression which specifies a boost condition. The syntax and
supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost documents with document ID "doc_1" or "doc_2", and
color "Red" or "Blue":
`(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
string condition = 1;public SearchRequest.BoostSpec.ConditionBoostSpec.Builder setConditionBytes(com.google.protobuf.ByteString value)
An expression which specifies a boost condition. The syntax and
supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost documents with document ID "doc_1" or "doc_2", and
color "Red" or "Blue":
`(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
string condition = 1;value - The bytes for condition to set.public float getBoost()
Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
float boost = 2;getBoost in interface SearchRequest.BoostSpec.ConditionBoostSpecOrBuilderpublic SearchRequest.BoostSpec.ConditionBoostSpec.Builder setBoost(float value)
Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
float boost = 2;value - The boost to set.public SearchRequest.BoostSpec.ConditionBoostSpec.Builder clearBoost()
Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
float boost = 2;public boolean hasBoostControlSpec()
Complex specification for custom ranking based on customer defined attribute value.
.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3;
hasBoostControlSpec in interface SearchRequest.BoostSpec.ConditionBoostSpecOrBuilderpublic SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec getBoostControlSpec()
Complex specification for custom ranking based on customer defined attribute value.
.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3;
getBoostControlSpec in interface SearchRequest.BoostSpec.ConditionBoostSpecOrBuilderpublic SearchRequest.BoostSpec.ConditionBoostSpec.Builder setBoostControlSpec(SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec value)
Complex specification for custom ranking based on customer defined attribute value.
.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3;
public SearchRequest.BoostSpec.ConditionBoostSpec.Builder setBoostControlSpec(SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.Builder builderForValue)
Complex specification for custom ranking based on customer defined attribute value.
.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3;
public SearchRequest.BoostSpec.ConditionBoostSpec.Builder mergeBoostControlSpec(SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec value)
Complex specification for custom ranking based on customer defined attribute value.
.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3;
public SearchRequest.BoostSpec.ConditionBoostSpec.Builder clearBoostControlSpec()
Complex specification for custom ranking based on customer defined attribute value.
.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3;
public SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.Builder getBoostControlSpecBuilder()
Complex specification for custom ranking based on customer defined attribute value.
.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3;
public SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpecOrBuilder getBoostControlSpecOrBuilder()
Complex specification for custom ranking based on customer defined attribute value.
.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3;
getBoostControlSpecOrBuilder in interface SearchRequest.BoostSpec.ConditionBoostSpecOrBuilderpublic final SearchRequest.BoostSpec.ConditionBoostSpec.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>public final SearchRequest.BoostSpec.ConditionBoostSpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.BoostSpec.ConditionBoostSpec.Builder>Copyright © 2025 Google LLC. All rights reserved.