Class SearchRequest.BoostSpec (2.5.1) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 2.5.1keyboard_arrow_down  
  
 
    
    
    
      
  
  
  
    
public   static   final   class  SearchRequest . BoostSpec   extends   GeneratedMessageV3   implements   SearchRequest . BoostSpecOrBuilder  
   Boost specification to boost certain items.
 Protobuf type google.cloud.retail.v2.SearchRequest.BoostSpec
Static Fields
   
  CONDITION_BOOST_SPECS_FIELD_NUMBER 
  
    
public   static   final   int   CONDITION_BOOST_SPECS_FIELD_NUMBER  
  Field Value 
  
  SKIP_BOOST_SPEC_VALIDATION_FIELD_NUMBER 
  
    
public   static   final   int   SKIP_BOOST_SPEC_VALIDATION_FIELD_NUMBER  
  Field Value 
  
  Static Methods
   
  getDefaultInstance() 
  
    
public   static   SearchRequest . BoostSpec   getDefaultInstance ()  
  Returns 
  
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  Returns 
  
  newBuilder() 
  
    
public   static   SearchRequest . BoostSpec . Builder   newBuilder ()  
  Returns 
  
  newBuilder(SearchRequest.BoostSpec prototype) 
  
    
public   static   SearchRequest . BoostSpec . Builder   newBuilder ( SearchRequest . BoostSpec   prototype )  
  Parameter 
  
  Returns 
  
  
    
public   static   SearchRequest . BoostSpec   parseDelimitedFrom ( InputStream   input )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SearchRequest . BoostSpec   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  parseFrom(byte[] data) 
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( byte []   data )  
  Parameter 
  
    
      
        Name Description  
      
        data byte [] 
     
  
  Returns 
  
  Exceptions 
  
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  parseFrom(ByteString data) 
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( ByteString   data )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( CodedInputStream   input )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( InputStream   input )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  parseFrom(ByteBuffer data) 
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( ByteBuffer   data )  
  Parameter 
  
  Returns 
  
  Exceptions 
  
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   SearchRequest . BoostSpec   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Exceptions 
  
  parser() 
  
    
public   static   Parser<SearchRequest . BoostSpec >  parser ()  
  Returns 
  
  Methods
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  getConditionBoostSpecs(int index) 
  
    
public   SearchRequest . BoostSpec . ConditionBoostSpec   getConditionBoostSpecs ( int   index )  
   Condition boost specifications. If a product matches multiple conditions
 in the specifictions, boost scores from these specifications are all
 applied and combined in a non-linear way. Maximum number of
 specifications is 20.
 
 repeated .google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
 
Parameter 
  
    
      
        Name Description  
      
        index int  
     
  
  Returns 
  
  getConditionBoostSpecsCount() 
  
    
public   int   getConditionBoostSpecsCount ()  
   Condition boost specifications. If a product matches multiple conditions
 in the specifictions, boost scores from these specifications are all
 applied and combined in a non-linear way. Maximum number of
 specifications is 20.
 
 repeated .google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
 
Returns 
  
  getConditionBoostSpecsList() 
  
    
public   List<SearchRequest . BoostSpec . ConditionBoostSpec >  getConditionBoostSpecsList ()  
   Condition boost specifications. If a product matches multiple conditions
 in the specifictions, boost scores from these specifications are all
 applied and combined in a non-linear way. Maximum number of
 specifications is 20.
 
 repeated .google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
 
Returns 
  
  getConditionBoostSpecsOrBuilder(int index) 
  
    
public   SearchRequest . BoostSpec . ConditionBoostSpecOrBuilder   getConditionBoostSpecsOrBuilder ( int   index )  
   Condition boost specifications. If a product matches multiple conditions
 in the specifictions, boost scores from these specifications are all
 applied and combined in a non-linear way. Maximum number of
 specifications is 20.
 
 repeated .google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
 
Parameter 
  
    
      
        Name Description  
      
        index int  
     
  
  Returns 
  
  getConditionBoostSpecsOrBuilderList() 
  
    
public   List <?   extends   SearchRequest . BoostSpec . ConditionBoostSpecOrBuilder >  getConditionBoostSpecsOrBuilderList ()  
   Condition boost specifications. If a product matches multiple conditions
 in the specifictions, boost scores from these specifications are all
 applied and combined in a non-linear way. Maximum number of
 specifications is 20.
 
 repeated .google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
 
Returns 
  
    
      
        Type Description  
      
        List <? extends com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder > 
     
  
  getDefaultInstanceForType() 
  
    
public   SearchRequest . BoostSpec   getDefaultInstanceForType ()  
  Returns 
  
  getParserForType() 
  
    
public   Parser<SearchRequest . BoostSpec >  getParserForType ()  
  Returns 
  
  Overrides 
  
  getSerializedSize() 
  
    
public   int   getSerializedSize ()  
  Returns 
  
  Overrides 
  
  getSkipBoostSpecValidation() 
  
    
public   boolean   getSkipBoostSpecValidation ()  
   Whether to skip boostspec validation. If this field is set to true,
 invalid
 BoostSpec.condition_boost_specs 
 will be ignored and valid
 BoostSpec.condition_boost_specs 
 will still be applied.
 optional bool skip_boost_spec_validation = 2;
Returns 
  
    
      
        Type Description  
      
        boolean The skipBoostSpecValidation.
 
     
  
  getUnknownFields() 
  
    
public   final   UnknownFieldSet   getUnknownFields ()  
  Returns 
  
  Overrides 
  
  hasSkipBoostSpecValidation() 
  
    
public   boolean   hasSkipBoostSpecValidation ()  
   Whether to skip boostspec validation. If this field is set to true,
 invalid
 BoostSpec.condition_boost_specs 
 will be ignored and valid
 BoostSpec.condition_boost_specs 
 will still be applied.
 optional bool skip_boost_spec_validation = 2;
Returns 
  
    
      
        Type Description  
      
        boolean Whether the skipBoostSpecValidation field is set.
 
     
  
  hashCode() 
  
  Returns 
  
  Overrides 
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  Returns 
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  Returns 
  
  Overrides 
  
  newBuilderForType() 
  
    
public   SearchRequest . BoostSpec . Builder   newBuilderForType ()  
  Returns 
  
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   SearchRequest . BoostSpec . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  toBuilder() 
  
    
public   SearchRequest . BoostSpec . Builder   toBuilder ()  
  Returns 
  
  writeTo(CodedOutputStream output) 
  
    
public   void   writeTo ( CodedOutputStream   output )  
  Parameter 
  
  Overrides 
  
  Exceptions 
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  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-10-29 UTC.
 
 
  
  
  
    
      [[["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-10-29 UTC."],[],[]]