Class SemanticSearch.Builder (0.1.0)

public static final class SemanticSearch.Builder extends GeneratedMessageV3.Builder<SemanticSearch.Builder> implements SemanticSearchOrBuilder

Defines a semantic search operation.

Protobuf type google.cloud.vectorsearch.v1beta.SemanticSearch

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SemanticSearch.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SemanticSearch.Builder
Overrides

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
Overrides

clearField(Descriptors.FieldDescriptor field)

public SemanticSearch.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SemanticSearch.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SemanticSearch.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SemanticSearch.Builder
Overrides

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.

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.

clone()

public SemanticSearch.Builder clone()
Returns
Type Description
SemanticSearch.Builder
Overrides

getDefaultInstanceForType()

public SemanticSearch getDefaultInstanceForType()
Returns
Type Description
SemanticSearch

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

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.

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.

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 GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

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
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SemanticSearch.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SemanticSearch.Builder
Overrides

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SemanticSearch.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SemanticSearch.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public SemanticSearch.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SemanticSearch.Builder
Overrides

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

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SemanticSearch.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SemanticSearch.Builder
Overrides

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 String

The 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 ByteString

The bytes for searchField to set.

Returns
Type Description
SemanticSearch.Builder

This builder for chaining.

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 String

The 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 ByteString

The 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 EmbeddingTaskType

The 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 int

The 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 int

The topK to set.

Returns
Type Description
SemanticSearch.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SemanticSearch.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SemanticSearch.Builder
Overrides