public static final class SearchRequest.SessionSpec.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.SessionSpec.Builder> implements SearchRequest.SessionSpecOrBuilder
Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.Protobuf type
google.cloud.discoveryengine.v1alpha.SearchRequest.SessionSpec| Modifier and Type | Method and Description |
|---|---|
SearchRequest.SessionSpec.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
SearchRequest.SessionSpec |
build() |
SearchRequest.SessionSpec |
buildPartial() |
SearchRequest.SessionSpec.Builder |
clear() |
SearchRequest.SessionSpec.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
SearchRequest.SessionSpec.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
SearchRequest.SessionSpec.Builder |
clearQueryId()
If set, the search result gets stored to the "turn" specified by this
query ID.
|
SearchRequest.SessionSpec.Builder |
clearSearchResultPersistenceCount()
The number of top search results to persist.
|
SearchRequest.SessionSpec.Builder |
clone() |
SearchRequest.SessionSpec |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getQueryId()
If set, the search result gets stored to the "turn" specified by this
query ID.
|
com.google.protobuf.ByteString |
getQueryIdBytes()
If set, the search result gets stored to the "turn" specified by this
query ID.
|
int |
getSearchResultPersistenceCount()
The number of top search results to persist.
|
boolean |
hasSearchResultPersistenceCount()
The number of top search results to persist.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
SearchRequest.SessionSpec.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
SearchRequest.SessionSpec.Builder |
mergeFrom(com.google.protobuf.Message other) |
SearchRequest.SessionSpec.Builder |
mergeFrom(SearchRequest.SessionSpec other) |
SearchRequest.SessionSpec.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
SearchRequest.SessionSpec.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
SearchRequest.SessionSpec.Builder |
setQueryId(String value)
If set, the search result gets stored to the "turn" specified by this
query ID.
|
SearchRequest.SessionSpec.Builder |
setQueryIdBytes(com.google.protobuf.ByteString value)
If set, the search result gets stored to the "turn" specified by this
query ID.
|
SearchRequest.SessionSpec.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
SearchRequest.SessionSpec.Builder |
setSearchResultPersistenceCount(int value)
The number of top search results to persist.
|
SearchRequest.SessionSpec.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, 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.SessionSpec.Builder>public SearchRequest.SessionSpec.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.SessionSpec.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.SessionSpec.Builder>public SearchRequest.SessionSpec getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic SearchRequest.SessionSpec build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic SearchRequest.SessionSpec buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic SearchRequest.SessionSpec.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.SessionSpec.Builder>public SearchRequest.SessionSpec.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.SessionSpec.Builder>public SearchRequest.SessionSpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.SessionSpec.Builder>public SearchRequest.SessionSpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.SessionSpec.Builder>public SearchRequest.SessionSpec.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.SessionSpec.Builder>public SearchRequest.SessionSpec.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.SessionSpec.Builder>public SearchRequest.SessionSpec.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchRequest.SessionSpec.Builder>public SearchRequest.SessionSpec.Builder mergeFrom(SearchRequest.SessionSpec other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.SessionSpec.Builder>public SearchRequest.SessionSpec.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.SessionSpec.Builder>IOExceptionpublic String getQueryId()
If set, the search result gets stored to the "turn" specified by this
query ID.
Example: Let's say the session looks like this:
session {
name: ".../sessions/xxx"
turns {
query { text: "What is foo?" query_id: ".../questions/yyy" }
answer: "Foo is ..."
}
turns {
query { text: "How about bar then?" query_id: ".../questions/zzz" }
}
}
The user can call /search API with a request like this:
session: ".../sessions/xxx"
session_spec { query_id: ".../questions/zzz" }
Then, the API stores the search result, associated with the last turn.
The stored search result can be used by a subsequent /answer API call
(with the session ID and the query ID specified). Also, it is possible
to call /search and /answer in parallel with the same session ID & query
ID.
string query_id = 1;getQueryId in interface SearchRequest.SessionSpecOrBuilderpublic com.google.protobuf.ByteString getQueryIdBytes()
If set, the search result gets stored to the "turn" specified by this
query ID.
Example: Let's say the session looks like this:
session {
name: ".../sessions/xxx"
turns {
query { text: "What is foo?" query_id: ".../questions/yyy" }
answer: "Foo is ..."
}
turns {
query { text: "How about bar then?" query_id: ".../questions/zzz" }
}
}
The user can call /search API with a request like this:
session: ".../sessions/xxx"
session_spec { query_id: ".../questions/zzz" }
Then, the API stores the search result, associated with the last turn.
The stored search result can be used by a subsequent /answer API call
(with the session ID and the query ID specified). Also, it is possible
to call /search and /answer in parallel with the same session ID & query
ID.
string query_id = 1;getQueryIdBytes in interface SearchRequest.SessionSpecOrBuilderpublic SearchRequest.SessionSpec.Builder setQueryId(String value)
If set, the search result gets stored to the "turn" specified by this
query ID.
Example: Let's say the session looks like this:
session {
name: ".../sessions/xxx"
turns {
query { text: "What is foo?" query_id: ".../questions/yyy" }
answer: "Foo is ..."
}
turns {
query { text: "How about bar then?" query_id: ".../questions/zzz" }
}
}
The user can call /search API with a request like this:
session: ".../sessions/xxx"
session_spec { query_id: ".../questions/zzz" }
Then, the API stores the search result, associated with the last turn.
The stored search result can be used by a subsequent /answer API call
(with the session ID and the query ID specified). Also, it is possible
to call /search and /answer in parallel with the same session ID & query
ID.
string query_id = 1;value - The queryId to set.public SearchRequest.SessionSpec.Builder clearQueryId()
If set, the search result gets stored to the "turn" specified by this
query ID.
Example: Let's say the session looks like this:
session {
name: ".../sessions/xxx"
turns {
query { text: "What is foo?" query_id: ".../questions/yyy" }
answer: "Foo is ..."
}
turns {
query { text: "How about bar then?" query_id: ".../questions/zzz" }
}
}
The user can call /search API with a request like this:
session: ".../sessions/xxx"
session_spec { query_id: ".../questions/zzz" }
Then, the API stores the search result, associated with the last turn.
The stored search result can be used by a subsequent /answer API call
(with the session ID and the query ID specified). Also, it is possible
to call /search and /answer in parallel with the same session ID & query
ID.
string query_id = 1;public SearchRequest.SessionSpec.Builder setQueryIdBytes(com.google.protobuf.ByteString value)
If set, the search result gets stored to the "turn" specified by this
query ID.
Example: Let's say the session looks like this:
session {
name: ".../sessions/xxx"
turns {
query { text: "What is foo?" query_id: ".../questions/yyy" }
answer: "Foo is ..."
}
turns {
query { text: "How about bar then?" query_id: ".../questions/zzz" }
}
}
The user can call /search API with a request like this:
session: ".../sessions/xxx"
session_spec { query_id: ".../questions/zzz" }
Then, the API stores the search result, associated with the last turn.
The stored search result can be used by a subsequent /answer API call
(with the session ID and the query ID specified). Also, it is possible
to call /search and /answer in parallel with the same session ID & query
ID.
string query_id = 1;value - The bytes for queryId to set.public boolean hasSearchResultPersistenceCount()
The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;hasSearchResultPersistenceCount in interface SearchRequest.SessionSpecOrBuilderpublic int getSearchResultPersistenceCount()
The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;getSearchResultPersistenceCount in interface SearchRequest.SessionSpecOrBuilderpublic SearchRequest.SessionSpec.Builder setSearchResultPersistenceCount(int value)
The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;value - The searchResultPersistenceCount to set.public SearchRequest.SessionSpec.Builder clearSearchResultPersistenceCount()
The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;public final SearchRequest.SessionSpec.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.SessionSpec.Builder>public final SearchRequest.SessionSpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.SessionSpec.Builder>Copyright © 2024 Google LLC. All rights reserved.