public static final class Rule.BoostAction.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder> implements Rule.BoostActionOrBuilder
A boost action to apply to results matching condition specified above.Protobuf type
google.cloud.retail.v2alpha.Rule.BoostAction| Modifier and Type | Method and Description |
|---|---|
Rule.BoostAction.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Rule.BoostAction |
build() |
Rule.BoostAction |
buildPartial() |
Rule.BoostAction.Builder |
clear() |
Rule.BoostAction.Builder |
clearBoost()
Strength of the condition boost, which must be in [-1, 1].
|
Rule.BoostAction.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Rule.BoostAction.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Rule.BoostAction.Builder |
clearProductsFilter()
The filter can have a max size of 5000 characters.
|
Rule.BoostAction.Builder |
clone() |
float |
getBoost()
Strength of the condition boost, which must be in [-1, 1].
|
Rule.BoostAction |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getProductsFilter()
The filter can have a max size of 5000 characters.
|
com.google.protobuf.ByteString |
getProductsFilterBytes()
The filter can have a max size of 5000 characters.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Rule.BoostAction.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Rule.BoostAction.Builder |
mergeFrom(com.google.protobuf.Message other) |
Rule.BoostAction.Builder |
mergeFrom(Rule.BoostAction other) |
Rule.BoostAction.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Rule.BoostAction.Builder |
setBoost(float value)
Strength of the condition boost, which must be in [-1, 1].
|
Rule.BoostAction.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Rule.BoostAction.Builder |
setProductsFilter(String value)
The filter can have a max size of 5000 characters.
|
Rule.BoostAction.Builder |
setProductsFilterBytes(com.google.protobuf.ByteString value)
The filter can have a max size of 5000 characters.
|
Rule.BoostAction.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Rule.BoostAction.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, 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<Rule.BoostAction.Builder>public Rule.BoostAction.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.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<Rule.BoostAction.Builder>public Rule.BoostAction getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Rule.BoostAction build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Rule.BoostAction buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Rule.BoostAction.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>public Rule.BoostAction.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<Rule.BoostAction.Builder>public Rule.BoostAction.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>public Rule.BoostAction.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>public Rule.BoostAction.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<Rule.BoostAction.Builder>public Rule.BoostAction.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<Rule.BoostAction.Builder>public Rule.BoostAction.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Rule.BoostAction.Builder>public Rule.BoostAction.Builder mergeFrom(Rule.BoostAction other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>public Rule.BoostAction.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<Rule.BoostAction.Builder>IOExceptionpublic float getBoost()
Strength of the condition boost, which must be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items 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 items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item 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.
float boost = 1;getBoost in interface Rule.BoostActionOrBuilderpublic Rule.BoostAction.Builder setBoost(float value)
Strength of the condition boost, which must be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items 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 items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item 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.
float boost = 1;value - The boost to set.public Rule.BoostAction.Builder clearBoost()
Strength of the condition boost, which must be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items 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 items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item 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.
float boost = 1;public String getProductsFilter()
The filter can have a max size of 5000 characters.
An expression which specifies which products to apply an action to.
The syntax and supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost products with product ID "product_1" or "product_2", and
color
"Red" or "Blue":<br>
*(id: ANY("product_1", "product_2"))<br>*
*AND<br>*
*(colorFamilies: ANY("Red", "Blue"))<br>*
string products_filter = 2;getProductsFilter in interface Rule.BoostActionOrBuilderpublic com.google.protobuf.ByteString getProductsFilterBytes()
The filter can have a max size of 5000 characters.
An expression which specifies which products to apply an action to.
The syntax and supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost products with product ID "product_1" or "product_2", and
color
"Red" or "Blue":<br>
*(id: ANY("product_1", "product_2"))<br>*
*AND<br>*
*(colorFamilies: ANY("Red", "Blue"))<br>*
string products_filter = 2;getProductsFilterBytes in interface Rule.BoostActionOrBuilderpublic Rule.BoostAction.Builder setProductsFilter(String value)
The filter can have a max size of 5000 characters.
An expression which specifies which products to apply an action to.
The syntax and supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost products with product ID "product_1" or "product_2", and
color
"Red" or "Blue":<br>
*(id: ANY("product_1", "product_2"))<br>*
*AND<br>*
*(colorFamilies: ANY("Red", "Blue"))<br>*
string products_filter = 2;value - The productsFilter to set.public Rule.BoostAction.Builder clearProductsFilter()
The filter can have a max size of 5000 characters.
An expression which specifies which products to apply an action to.
The syntax and supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost products with product ID "product_1" or "product_2", and
color
"Red" or "Blue":<br>
*(id: ANY("product_1", "product_2"))<br>*
*AND<br>*
*(colorFamilies: ANY("Red", "Blue"))<br>*
string products_filter = 2;public Rule.BoostAction.Builder setProductsFilterBytes(com.google.protobuf.ByteString value)
The filter can have a max size of 5000 characters.
An expression which specifies which products to apply an action to.
The syntax and supported fields are the same as a filter expression. See
[SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
for detail syntax and limitations.
Examples:
* To boost products with product ID "product_1" or "product_2", and
color
"Red" or "Blue":<br>
*(id: ANY("product_1", "product_2"))<br>*
*AND<br>*
*(colorFamilies: ANY("Red", "Blue"))<br>*
string products_filter = 2;value - The bytes for productsFilter to set.public final Rule.BoostAction.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>public final Rule.BoostAction.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>Copyright © 2024 Google LLC. All rights reserved.