public static final class SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder> implements SearchRequest.ContentSearchSpec.ExtractiveContentSpecOrBuilder
A specification for configuring the extractive content in a search response.Protobuf type
google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpecgetAllFields, 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<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.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<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic SearchRequest.ContentSearchSpec.ExtractiveContentSpec build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic SearchRequest.ContentSearchSpec.ExtractiveContentSpec buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.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<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.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<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.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<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder mergeFrom(SearchRequest.ContentSearchSpec.ExtractiveContentSpec other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.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<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>IOExceptionpublic int getMaxExtractiveAnswerCount()
The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
int32 max_extractive_answer_count = 1;getMaxExtractiveAnswerCount in interface SearchRequest.ContentSearchSpec.ExtractiveContentSpecOrBuilderpublic SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder setMaxExtractiveAnswerCount(int value)
The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
int32 max_extractive_answer_count = 1;value - The maxExtractiveAnswerCount to set.public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder clearMaxExtractiveAnswerCount()
The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
int32 max_extractive_answer_count = 1;public int getMaxExtractiveSegmentCount()
The max number of extractive segments returned in each search result. Only applied if the [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] or [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] is [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.
int32 max_extractive_segment_count = 2;getMaxExtractiveSegmentCount in interface SearchRequest.ContentSearchSpec.ExtractiveContentSpecOrBuilderpublic SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder setMaxExtractiveSegmentCount(int value)
The max number of extractive segments returned in each search result. Only applied if the [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] or [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] is [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.
int32 max_extractive_segment_count = 2;value - The maxExtractiveSegmentCount to set.public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder clearMaxExtractiveSegmentCount()
The max number of extractive segments returned in each search result. Only applied if the [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] or [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] is [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.
int32 max_extractive_segment_count = 2;public boolean getReturnExtractiveSegmentScore()
Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.
bool return_extractive_segment_score = 3;getReturnExtractiveSegmentScore in interface SearchRequest.ContentSearchSpec.ExtractiveContentSpecOrBuilderpublic SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder setReturnExtractiveSegmentScore(boolean value)
Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.
bool return_extractive_segment_score = 3;value - The returnExtractiveSegmentScore to set.public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder clearReturnExtractiveSegmentScore()
Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.
bool return_extractive_segment_score = 3;public int getNumPreviousSegments()
Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.
int32 num_previous_segments = 4;getNumPreviousSegments in interface SearchRequest.ContentSearchSpec.ExtractiveContentSpecOrBuilderpublic SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder setNumPreviousSegments(int value)
Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.
int32 num_previous_segments = 4;value - The numPreviousSegments to set.public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder clearNumPreviousSegments()
Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.
int32 num_previous_segments = 4;public int getNumNextSegments()
Return at most `num_next_segments` segments after each selected segments.
int32 num_next_segments = 5;getNumNextSegments in interface SearchRequest.ContentSearchSpec.ExtractiveContentSpecOrBuilderpublic SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder setNumNextSegments(int value)
Return at most `num_next_segments` segments after each selected segments.
int32 num_next_segments = 5;value - The numNextSegments to set.public SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder clearNumNextSegments()
Return at most `num_next_segments` segments after each selected segments.
int32 num_next_segments = 5;public final SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>public final SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.ContentSearchSpec.ExtractiveContentSpec.Builder>Copyright © 2025 Google LLC. All rights reserved.