Class SearchRequest.CrowdingSpec

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
All Implemented Interfaces:
SearchRequest.CrowdingSpecOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
SearchRequest

public static final class SearchRequest.CrowdingSpec extends com.google.protobuf.GeneratedMessage implements SearchRequest.CrowdingSpecOrBuilder
 Specification for crowding. Crowding improves the diversity of search
 results by limiting the number of results that share the same field value.
 For example, crowding on the color field with a max_count of 3 and mode
 DROP_CROWDED_RESULTS will return at most 3 results with the same color
 across all pages.
 
Protobuf type google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
See Also:
  • Field Details

  • 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
    • getField

      public String getField()
       The field to use for crowding. Documents can be crowded by a field in the
       [Document][google.cloud.discoveryengine.v1.Document] object. Crowding
       field is case sensitive.
       
      string field = 1;
      Specified by:
      getField in interface SearchRequest.CrowdingSpecOrBuilder
      Returns:
      The field.
    • getFieldBytes

      public com.google.protobuf.ByteString getFieldBytes()
       The field to use for crowding. Documents can be crowded by a field in the
       [Document][google.cloud.discoveryengine.v1.Document] object. Crowding
       field is case sensitive.
       
      string field = 1;
      Specified by:
      getFieldBytes in interface SearchRequest.CrowdingSpecOrBuilder
      Returns:
      The bytes for field.
    • getMaxCount

      public int getMaxCount()
       The maximum number of documents to keep per value of the field. Once
       there are at least max_count previous results which contain the same
       value for the given field (according to the order specified in
       `order_by`), later results with the same value are "crowded away".
       If not specified, the default value is 1.
       
      int32 max_count = 2;
      Specified by:
      getMaxCount in interface SearchRequest.CrowdingSpecOrBuilder
      Returns:
      The maxCount.
    • getModeValue

      public int getModeValue()
       Mode to use for documents that are crowded away.
       
      .google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode mode = 3;
      Specified by:
      getModeValue in interface SearchRequest.CrowdingSpecOrBuilder
      Returns:
      The enum numeric value on the wire for mode.
    • getMode

       Mode to use for documents that are crowded away.
       
      .google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode mode = 3;
      Specified by:
      getMode in interface SearchRequest.CrowdingSpecOrBuilder
      Returns:
      The mode.
    • 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 SearchRequest.CrowdingSpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchRequest.CrowdingSpec parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchRequest.CrowdingSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchRequest.CrowdingSpec parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SearchRequest.CrowdingSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

      public static SearchRequest.CrowdingSpec parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public static SearchRequest.CrowdingSpec parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

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

      public static SearchRequest.CrowdingSpec parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public SearchRequest.CrowdingSpec.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static SearchRequest.CrowdingSpec.Builder newBuilder()
    • newBuilder

      public static SearchRequest.CrowdingSpec.Builder newBuilder(SearchRequest.CrowdingSpec prototype)
    • toBuilder

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

      protected SearchRequest.CrowdingSpec.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static SearchRequest.CrowdingSpec getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<SearchRequest.CrowdingSpec> parser()
    • getParserForType

      public com.google.protobuf.Parser<SearchRequest.CrowdingSpec> 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 SearchRequest.CrowdingSpec getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder