- 0.49.0 (latest)
- 0.48.0
- 0.47.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
public static final class SearchRequest.SessionSpec.Builder extends 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.v1beta.SearchRequest.SessionSpec
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > SearchRequest.SessionSpec.BuilderImplements
SearchRequest.SessionSpecOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public SearchRequest.SessionSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
build()
public SearchRequest.SessionSpec build()
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec |
buildPartial()
public SearchRequest.SessionSpec buildPartial()
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec |
clear()
public SearchRequest.SessionSpec.Builder clear()
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
clearField(Descriptors.FieldDescriptor field)
public SearchRequest.SessionSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public SearchRequest.SessionSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
clearQueryId()
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;
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
This builder for chaining. |
clearSearchResultPersistenceCount()
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.
At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
This builder for chaining. |
clone()
public SearchRequest.SessionSpec.Builder clone()
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
getDefaultInstanceForType()
public SearchRequest.SessionSpec getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getQueryId()
public 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;
Returns | |
---|---|
Type | Description |
String |
The queryId. |
getQueryIdBytes()
public 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;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for queryId. |
getSearchResultPersistenceCount()
public 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.
At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;
Returns | |
---|---|
Type | Description |
int |
The searchResultPersistenceCount. |
hasSearchResultPersistenceCount()
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.
At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;
Returns | |
---|---|
Type | Description |
boolean |
Whether the searchResultPersistenceCount field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(SearchRequest.SessionSpec other)
public SearchRequest.SessionSpec.Builder mergeFrom(SearchRequest.SessionSpec other)
Parameter | |
---|---|
Name | Description |
other |
SearchRequest.SessionSpec |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public SearchRequest.SessionSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public SearchRequest.SessionSpec.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final SearchRequest.SessionSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public SearchRequest.SessionSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
setQueryId(String value)
public 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;
Parameter | |
---|---|
Name | Description |
value |
String The queryId to set. |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
This builder for chaining. |
setQueryIdBytes(ByteString value)
public SearchRequest.SessionSpec.Builder setQueryIdBytes(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;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for queryId to set. |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public SearchRequest.SessionSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
setSearchResultPersistenceCount(int value)
public 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.
At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;
Parameter | |
---|---|
Name | Description |
value |
int The searchResultPersistenceCount to set. |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final SearchRequest.SessionSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
SearchRequest.SessionSpec.Builder |