public static final class SemanticSearch.Builder extends GeneratedMessage.Builder<SemanticSearch.Builder> implements SemanticSearchOrBuilderDefines a semantic search operation.
Protobuf type google.cloud.vectorsearch.v1beta.SemanticSearch
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > SemanticSearch.BuilderImplements
SemanticSearchOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public SemanticSearch build()| Returns | |
|---|---|
| Type | Description |
SemanticSearch |
|
buildPartial()
public SemanticSearch buildPartial()| Returns | |
|---|---|
| Type | Description |
SemanticSearch |
|
clear()
public SemanticSearch.Builder clear()| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
clearFilter()
public SemanticSearch.Builder clearFilter()Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
.google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
clearOutputFields()
public SemanticSearch.Builder clearOutputFields()Optional. The fields to return in the search results.
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
clearSearchField()
public SemanticSearch.Builder clearSearchField()Required. The vector field to search.
string search_field = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
clearSearchHint()
public SemanticSearch.Builder clearSearchHint()Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to KNN search otherwise.
.google.cloud.vectorsearch.v1beta.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
clearSearchText()
public SemanticSearch.Builder clearSearchText()Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
clearTaskType()
public SemanticSearch.Builder clearTaskType()Optional. The task type of the query embedding.
.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
clearTopK()
public SemanticSearch.Builder clearTopK()Optional. The number of data objects to return.
optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public SemanticSearch getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
SemanticSearch |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getFilter()
public Struct getFilter()Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
.google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Struct |
The filter. |
getFilterBuilder()
public Struct.Builder getFilterBuilder()Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
.google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getFilterOrBuilder()
public StructOrBuilder getFilterOrBuilder()Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
.google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
StructOrBuilder |
|
getOutputFields()
public OutputFields getOutputFields()Optional. The fields to return in the search results.
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
OutputFields |
The outputFields. |
getOutputFieldsBuilder()
public OutputFields.Builder getOutputFieldsBuilder()Optional. The fields to return in the search results.
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
OutputFields.Builder |
|
getOutputFieldsOrBuilder()
public OutputFieldsOrBuilder getOutputFieldsOrBuilder()Optional. The fields to return in the search results.
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
OutputFieldsOrBuilder |
|
getSearchField()
public String getSearchField()Required. The vector field to search.
string search_field = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The searchField. |
getSearchFieldBytes()
public ByteString getSearchFieldBytes()Required. The vector field to search.
string search_field = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for searchField. |
getSearchHint()
public SearchHint getSearchHint()Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to KNN search otherwise.
.google.cloud.vectorsearch.v1beta.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SearchHint |
The searchHint. |
getSearchHintBuilder()
public SearchHint.Builder getSearchHintBuilder()Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to KNN search otherwise.
.google.cloud.vectorsearch.v1beta.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SearchHint.Builder |
|
getSearchHintOrBuilder()
public SearchHintOrBuilder getSearchHintOrBuilder()Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to KNN search otherwise.
.google.cloud.vectorsearch.v1beta.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SearchHintOrBuilder |
|
getSearchText()
public String getSearchText()Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The searchText. |
getSearchTextBytes()
public ByteString getSearchTextBytes()Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for searchText. |
getTaskType()
public EmbeddingTaskType getTaskType()Optional. The task type of the query embedding.
.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
EmbeddingTaskType |
The taskType. |
getTaskTypeValue()
public int getTaskTypeValue()Optional. The task type of the query embedding.
.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for taskType. |
getTopK()
public int getTopK()Optional. The number of data objects to return.
optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The topK. |
hasFilter()
public boolean hasFilter()Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
.google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the filter field is set. |
hasOutputFields()
public boolean hasOutputFields()Optional. The fields to return in the search results.
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the outputFields field is set. |
hasSearchHint()
public boolean hasSearchHint()Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to KNN search otherwise.
.google.cloud.vectorsearch.v1beta.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the searchHint field is set. |
hasTopK()
public boolean hasTopK()Optional. The number of data objects to return.
optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the topK field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFilter(Struct value)
public SemanticSearch.Builder mergeFilter(Struct value)Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
.google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
mergeFrom(SemanticSearch other)
public SemanticSearch.Builder mergeFrom(SemanticSearch other)| Parameter | |
|---|---|
| Name | Description |
other |
SemanticSearch |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public SemanticSearch.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public SemanticSearch.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
mergeOutputFields(OutputFields value)
public SemanticSearch.Builder mergeOutputFields(OutputFields value)Optional. The fields to return in the search results.
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
OutputFields |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
mergeSearchHint(SearchHint value)
public SemanticSearch.Builder mergeSearchHint(SearchHint value)Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to KNN search otherwise.
.google.cloud.vectorsearch.v1beta.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
SearchHint |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
setFilter(Struct value)
public SemanticSearch.Builder setFilter(Struct value)Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
.google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
setFilter(Struct.Builder builderForValue)
public SemanticSearch.Builder setFilter(Struct.Builder builderForValue)Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
.google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
setOutputFields(OutputFields value)
public SemanticSearch.Builder setOutputFields(OutputFields value)Optional. The fields to return in the search results.
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
OutputFields |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
setOutputFields(OutputFields.Builder builderForValue)
public SemanticSearch.Builder setOutputFields(OutputFields.Builder builderForValue)Optional. The fields to return in the search results.
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
OutputFields.Builder |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
setSearchField(String value)
public SemanticSearch.Builder setSearchField(String value)Required. The vector field to search.
string search_field = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe searchField to set. |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
setSearchFieldBytes(ByteString value)
public SemanticSearch.Builder setSearchFieldBytes(ByteString value)Required. The vector field to search.
string search_field = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for searchField to set. |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
setSearchHint(SearchHint value)
public SemanticSearch.Builder setSearchHint(SearchHint value)Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to KNN search otherwise.
.google.cloud.vectorsearch.v1beta.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
SearchHint |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
setSearchHint(SearchHint.Builder builderForValue)
public SemanticSearch.Builder setSearchHint(SearchHint.Builder builderForValue)Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to KNN search otherwise.
.google.cloud.vectorsearch.v1beta.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
SearchHint.Builder |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
|
setSearchText(String value)
public SemanticSearch.Builder setSearchText(String value)Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe searchText to set. |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
setSearchTextBytes(ByteString value)
public SemanticSearch.Builder setSearchTextBytes(ByteString value)Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for searchText to set. |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
setTaskType(EmbeddingTaskType value)
public SemanticSearch.Builder setTaskType(EmbeddingTaskType value)Optional. The task type of the query embedding.
.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
EmbeddingTaskTypeThe taskType to set. |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
setTaskTypeValue(int value)
public SemanticSearch.Builder setTaskTypeValue(int value)Optional. The task type of the query embedding.
.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for taskType to set. |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |
setTopK(int value)
public SemanticSearch.Builder setTopK(int value)Optional. The number of data objects to return.
optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe topK to set. |
| Returns | |
|---|---|
| Type | Description |
SemanticSearch.Builder |
This builder for chaining. |