public static final class TextSearch.Builder extends GeneratedMessage.Builder<TextSearch.Builder> implements TextSearchOrBuilderDefines a text search operation.
Protobuf type google.cloud.vectorsearch.v1beta.TextSearch
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > TextSearch.BuilderImplements
TextSearchOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllDataFieldNames(Iterable<String> values)
public TextSearch.Builder addAllDataFieldNames(Iterable<String> values)Required. The data field names to search.
repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The dataFieldNames to add. |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |
addDataFieldNames(String value)
public TextSearch.Builder addDataFieldNames(String value)Required. The data field names to search.
repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe dataFieldNames to add. |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |
addDataFieldNamesBytes(ByteString value)
public TextSearch.Builder addDataFieldNamesBytes(ByteString value)Required. The data field names to search.
repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the dataFieldNames to add. |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |
build()
public TextSearch build()| Returns | |
|---|---|
| Type | Description |
TextSearch |
|
buildPartial()
public TextSearch buildPartial()| Returns | |
|---|---|
| Type | Description |
TextSearch |
|
clear()
public TextSearch.Builder clear()| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
|
clearDataFieldNames()
public TextSearch.Builder clearDataFieldNames()Required. The data field names to search.
repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |
clearFilter()
public TextSearch.Builder clearFilter() Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
represented as a google.protobuf.Struct.
.google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
|
clearOutputFields()
public TextSearch.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 |
TextSearch.Builder |
|
clearSearchText()
public TextSearch.Builder clearSearchText()Required. The query text.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |
clearTopK()
public TextSearch.Builder clearTopK()Optional. The number of results to return.
optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |
getDataFieldNames(int index)
public String getDataFieldNames(int index)Required. The data field names to search.
repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The dataFieldNames at the given index. |
getDataFieldNamesBytes(int index)
public ByteString getDataFieldNamesBytes(int index)Required. The data field names to search.
repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the dataFieldNames at the given index. |
getDataFieldNamesCount()
public int getDataFieldNamesCount()Required. The data field names to search.
repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
int |
The count of dataFieldNames. |
getDataFieldNamesList()
public ProtocolStringList getDataFieldNamesList()Required. The data field names to search.
repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the dataFieldNames. |
getDefaultInstanceForType()
public TextSearch getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
TextSearch |
|
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 = 5 [(.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 = 5 [(.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 = 5 [(.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 |
|
getSearchText()
public String getSearchText()Required. The query text.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The searchText. |
getSearchTextBytes()
public ByteString getSearchTextBytes()Required. The query text.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for searchText. |
getTopK()
public int getTopK()Optional. The number of results 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 = 5 [(.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. |
hasTopK()
public boolean hasTopK()Optional. The number of results 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 TextSearch.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 = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
|
mergeFrom(TextSearch other)
public TextSearch.Builder mergeFrom(TextSearch other)| Parameter | |
|---|---|
| Name | Description |
other |
TextSearch |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public TextSearch.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public TextSearch.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
|
mergeOutputFields(OutputFields value)
public TextSearch.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 |
TextSearch.Builder |
|
setDataFieldNames(int index, String value)
public TextSearch.Builder setDataFieldNames(int index, String value)Required. The data field names to search.
repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe dataFieldNames to set. |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |
setFilter(Struct value)
public TextSearch.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 = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
|
setFilter(Struct.Builder builderForValue)
public TextSearch.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 = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
|
setOutputFields(OutputFields value)
public TextSearch.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 |
TextSearch.Builder |
|
setOutputFields(OutputFields.Builder builderForValue)
public TextSearch.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 |
TextSearch.Builder |
|
setSearchText(String value)
public TextSearch.Builder setSearchText(String value)Required. The query text.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe searchText to set. |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |
setSearchTextBytes(ByteString value)
public TextSearch.Builder setSearchTextBytes(ByteString value)Required. The query text.
string search_text = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for searchText to set. |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |
setTopK(int value)
public TextSearch.Builder setTopK(int value)Optional. The number of results to return.
optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe topK to set. |
| Returns | |
|---|---|
| Type | Description |
TextSearch.Builder |
This builder for chaining. |