Class CatalogAttribute.FacetConfig.RerankConfig

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig
All Implemented Interfaces:
CatalogAttribute.FacetConfig.RerankConfigOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
CatalogAttribute.FacetConfig

public static final class CatalogAttribute.FacetConfig.RerankConfig extends com.google.protobuf.GeneratedMessage implements CatalogAttribute.FacetConfig.RerankConfigOrBuilder
 Options to rerank based on facet values engaged by the user for the
 current key. That key needs to be a custom textual key and facetable.
 To use this control, you also need to pass all the facet keys engaged by
 the user in the request using the field [SearchRequest.FacetSpec]. In
 particular, if you don't pass the facet keys engaged that you want to
 rerank on, this control won't be effective. Moreover, to obtain better
 results, the facet values that you want to rerank on should be close to
 English (ideally made of words, underscores, and spaces).
 
Protobuf type google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig
See Also:
  • Field Details

    • RERANK_FACET_FIELD_NUMBER

      public static final int RERANK_FACET_FIELD_NUMBER
      See Also:
    • FACET_VALUES_FIELD_NUMBER

      public static final int FACET_VALUES_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getRerankFacet

      public boolean getRerankFacet()
       If set to true, then we also rerank the dynamic facets based on the
       facet values engaged by the user for the current attribute key during
       serving.
       
      bool rerank_facet = 1;
      Specified by:
      getRerankFacet in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Returns:
      The rerankFacet.
    • getFacetValuesList

      public com.google.protobuf.ProtocolStringList getFacetValuesList()
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Specified by:
      getFacetValuesList in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Returns:
      A list containing the facetValues.
    • getFacetValuesCount

      public int getFacetValuesCount()
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Specified by:
      getFacetValuesCount in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Returns:
      The count of facetValues.
    • getFacetValues

      public String getFacetValues(int index)
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Specified by:
      getFacetValues in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The facetValues at the given index.
    • getFacetValuesBytes

      public com.google.protobuf.ByteString getFacetValuesBytes(int index)
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Specified by:
      getFacetValuesBytes in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the facetValues at the given index.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CatalogAttribute.FacetConfig.RerankConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected CatalogAttribute.FacetConfig.RerankConfig.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static CatalogAttribute.FacetConfig.RerankConfig getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<CatalogAttribute.FacetConfig.RerankConfig> parser()
    • getParserForType

      public com.google.protobuf.Parser<CatalogAttribute.FacetConfig.RerankConfig> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public CatalogAttribute.FacetConfig.RerankConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder