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| Modifier and Type | Class and Description |
|---|---|
static class |
SearchRequest.CrowdingSpec.Builder
Specification for crowding.
|
static class |
SearchRequest.CrowdingSpec.Mode
Enum describing the mode to use for documents that are crowded away.
|
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
FIELD_FIELD_NUMBER |
static int |
MAX_COUNT_FIELD_NUMBER |
static int |
MODE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static SearchRequest.CrowdingSpec |
getDefaultInstance() |
SearchRequest.CrowdingSpec |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getField()
The field to use for crowding.
|
com.google.protobuf.ByteString |
getFieldBytes()
The field to use for crowding.
|
int |
getMaxCount()
The maximum number of documents to keep per value of the field.
|
SearchRequest.CrowdingSpec.Mode |
getMode()
Mode to use for documents that are crowded away.
|
int |
getModeValue()
Mode to use for documents that are crowded away.
|
com.google.protobuf.Parser<SearchRequest.CrowdingSpec> |
getParserForType() |
int |
getSerializedSize() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static SearchRequest.CrowdingSpec.Builder |
newBuilder() |
static SearchRequest.CrowdingSpec.Builder |
newBuilder(SearchRequest.CrowdingSpec prototype) |
SearchRequest.CrowdingSpec.Builder |
newBuilderForType() |
protected SearchRequest.CrowdingSpec.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static SearchRequest.CrowdingSpec |
parseDelimitedFrom(InputStream input) |
static SearchRequest.CrowdingSpec |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.CrowdingSpec |
parseFrom(byte[] data) |
static SearchRequest.CrowdingSpec |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.CrowdingSpec |
parseFrom(ByteBuffer data) |
static SearchRequest.CrowdingSpec |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.CrowdingSpec |
parseFrom(com.google.protobuf.ByteString data) |
static SearchRequest.CrowdingSpec |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.CrowdingSpec |
parseFrom(com.google.protobuf.CodedInputStream input) |
static SearchRequest.CrowdingSpec |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.CrowdingSpec |
parseFrom(InputStream input) |
static SearchRequest.CrowdingSpec |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<SearchRequest.CrowdingSpec> |
parser() |
SearchRequest.CrowdingSpec.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int FIELD_FIELD_NUMBER
public static final int MAX_COUNT_FIELD_NUMBER
public static final int MODE_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic 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;getField in interface SearchRequest.CrowdingSpecOrBuilderpublic 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;getFieldBytes in interface SearchRequest.CrowdingSpecOrBuilderpublic 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;getMaxCount in interface SearchRequest.CrowdingSpecOrBuilderpublic int getModeValue()
Mode to use for documents that are crowded away.
.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode mode = 3;getModeValue in interface SearchRequest.CrowdingSpecOrBuilderpublic SearchRequest.CrowdingSpec.Mode getMode()
Mode to use for documents that are crowded away.
.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode mode = 3;getMode in interface SearchRequest.CrowdingSpecOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageIOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessagepublic boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static SearchRequest.CrowdingSpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.CrowdingSpec parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.CrowdingSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.CrowdingSpec parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.CrowdingSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.CrowdingSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.CrowdingSpec parseFrom(InputStream input) throws IOException
IOExceptionpublic static SearchRequest.CrowdingSpec parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static SearchRequest.CrowdingSpec parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static SearchRequest.CrowdingSpec parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static SearchRequest.CrowdingSpec parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static SearchRequest.CrowdingSpec parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic SearchRequest.CrowdingSpec.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static SearchRequest.CrowdingSpec.Builder newBuilder()
public static SearchRequest.CrowdingSpec.Builder newBuilder(SearchRequest.CrowdingSpec prototype)
public SearchRequest.CrowdingSpec.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected SearchRequest.CrowdingSpec.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static SearchRequest.CrowdingSpec getDefaultInstance()
public static com.google.protobuf.Parser<SearchRequest.CrowdingSpec> parser()
public com.google.protobuf.Parser<SearchRequest.CrowdingSpec> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic SearchRequest.CrowdingSpec getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2026 Google LLC. All rights reserved.