public static final class TextQuery.Builder extends GeneratedMessage.Builder<TextQuery.Builder> implements TextQueryOrBuilderA leaf-level text query targeting one or more data fields. When multiple fields are specified, this is equivalent to combining per-field matches with an OR operator (i.e. the query matches if the text is found in any of the listed fields).
Protobuf type google.cloud.vectorsearch.v1beta.TextQuery
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > TextQuery.BuilderImplements
TextQueryOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllFields(Iterable<String> values)
public TextQuery.Builder addAllFields(Iterable<String> values)Required. The data fields to search against.
repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The fields to add. |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
addFields(String value)
public TextQuery.Builder addFields(String value)Required. The data fields to search against.
repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe fields to add. |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
addFieldsBytes(ByteString value)
public TextQuery.Builder addFieldsBytes(ByteString value)Required. The data fields to search against.
repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the fields to add. |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
build()
public TextQuery build()| Returns | |
|---|---|
| Type | Description |
TextQuery |
|
buildPartial()
public TextQuery buildPartial()| Returns | |
|---|---|
| Type | Description |
TextQuery |
|
clear()
public TextQuery.Builder clear()| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
|
clearFields()
public TextQuery.Builder clearFields()Required. The data fields to search against.
repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
clearMatchType()
public TextQuery.Builder clearMatchType() Optional. The matching strategy to apply for this query. If unset, defaults
to STANDARD.
.google.cloud.vectorsearch.v1beta.TextQuery.MatchType match_type = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
clearQueryEnhancement()
public TextQuery.Builder clearQueryEnhancement()Optional. The query enhancement settings to apply for this query.
.google.cloud.vectorsearch.v1beta.QueryEnhancement query_enhancement = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
|
clearText()
public TextQuery.Builder clearText()Required. The text to search for.
string text = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public TextQuery getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
TextQuery |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getFields(int index)
public String getFields(int index)Required. The data fields to search against.
repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The fields at the given index. |
getFieldsBytes(int index)
public ByteString getFieldsBytes(int index)Required. The data fields to search against.
repeated string fields = 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 fields at the given index. |
getFieldsCount()
public int getFieldsCount()Required. The data fields to search against.
repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
int |
The count of fields. |
getFieldsList()
public ProtocolStringList getFieldsList()Required. The data fields to search against.
repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the fields. |
getMatchType()
public TextQuery.MatchType getMatchType() Optional. The matching strategy to apply for this query. If unset, defaults
to STANDARD.
.google.cloud.vectorsearch.v1beta.TextQuery.MatchType match_type = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TextQuery.MatchType |
The matchType. |
getMatchTypeValue()
public int getMatchTypeValue() Optional. The matching strategy to apply for this query. If unset, defaults
to STANDARD.
.google.cloud.vectorsearch.v1beta.TextQuery.MatchType match_type = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for matchType. |
getQueryEnhancement()
public QueryEnhancement getQueryEnhancement()Optional. The query enhancement settings to apply for this query.
.google.cloud.vectorsearch.v1beta.QueryEnhancement query_enhancement = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
QueryEnhancement |
The queryEnhancement. |
getQueryEnhancementBuilder()
public QueryEnhancement.Builder getQueryEnhancementBuilder()Optional. The query enhancement settings to apply for this query.
.google.cloud.vectorsearch.v1beta.QueryEnhancement query_enhancement = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
QueryEnhancement.Builder |
|
getQueryEnhancementOrBuilder()
public QueryEnhancementOrBuilder getQueryEnhancementOrBuilder()Optional. The query enhancement settings to apply for this query.
.google.cloud.vectorsearch.v1beta.QueryEnhancement query_enhancement = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
QueryEnhancementOrBuilder |
|
getText()
public String getText()Required. The text to search for.
string text = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The text. |
getTextBytes()
public ByteString getTextBytes()Required. The text to search for.
string text = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for text. |
hasQueryEnhancement()
public boolean hasQueryEnhancement()Optional. The query enhancement settings to apply for this query.
.google.cloud.vectorsearch.v1beta.QueryEnhancement query_enhancement = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the queryEnhancement field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(TextQuery other)
public TextQuery.Builder mergeFrom(TextQuery other)| Parameter | |
|---|---|
| Name | Description |
other |
TextQuery |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public TextQuery.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public TextQuery.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
|
mergeQueryEnhancement(QueryEnhancement value)
public TextQuery.Builder mergeQueryEnhancement(QueryEnhancement value)Optional. The query enhancement settings to apply for this query.
.google.cloud.vectorsearch.v1beta.QueryEnhancement query_enhancement = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
QueryEnhancement |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
|
setFields(int index, String value)
public TextQuery.Builder setFields(int index, String value)Required. The data fields to search against.
repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe fields to set. |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
setMatchType(TextQuery.MatchType value)
public TextQuery.Builder setMatchType(TextQuery.MatchType value) Optional. The matching strategy to apply for this query. If unset, defaults
to STANDARD.
.google.cloud.vectorsearch.v1beta.TextQuery.MatchType match_type = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
TextQuery.MatchTypeThe matchType to set. |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
setMatchTypeValue(int value)
public TextQuery.Builder setMatchTypeValue(int value) Optional. The matching strategy to apply for this query. If unset, defaults
to STANDARD.
.google.cloud.vectorsearch.v1beta.TextQuery.MatchType match_type = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for matchType to set. |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
setQueryEnhancement(QueryEnhancement value)
public TextQuery.Builder setQueryEnhancement(QueryEnhancement value)Optional. The query enhancement settings to apply for this query.
.google.cloud.vectorsearch.v1beta.QueryEnhancement query_enhancement = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
QueryEnhancement |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
|
setQueryEnhancement(QueryEnhancement.Builder builderForValue)
public TextQuery.Builder setQueryEnhancement(QueryEnhancement.Builder builderForValue)Optional. The query enhancement settings to apply for this query.
.google.cloud.vectorsearch.v1beta.QueryEnhancement query_enhancement = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
QueryEnhancement.Builder |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
|
setText(String value)
public TextQuery.Builder setText(String value)Required. The text to search for.
string text = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe text to set. |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |
setTextBytes(ByteString value)
public TextQuery.Builder setTextBytes(ByteString value)Required. The text to search for.
string text = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for text to set. |
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
This builder for chaining. |