public static final class StructuredQuery.Builder extends GeneratedMessage.Builder<StructuredQuery.Builder> implements StructuredQueryOrBuilderA structured query for text search. Allows expressing field-targeted text queries combined via boolean operators, with optional per-node boosting.
Protobuf type google.cloud.vectorsearch.v1beta.StructuredQuery
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > StructuredQuery.BuilderImplements
StructuredQueryOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public StructuredQuery build()| Returns | |
|---|---|
| Type | Description |
StructuredQuery |
|
buildPartial()
public StructuredQuery buildPartial()| Returns | |
|---|---|
| Type | Description |
StructuredQuery |
|
clear()
public StructuredQuery.Builder clear()| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
clearBoost()
public StructuredQuery.Builder clearBoost()Optional. Optional multiplier applied to this query node's contribution to the final relevance score. Must be non-negative; if unset or 0, defaults to 1.0. Values greater than 1.0 increase its influence on ranking, values between 0.0 and 1.0 decrease it.
float boost = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
This builder for chaining. |
clearCombine()
public StructuredQuery.Builder clearCombine()Optional. A query that combines multiple sub-queries with a boolean operator.
.google.cloud.vectorsearch.v1beta.CombinedQuery combine = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
clearQueryType()
public StructuredQuery.Builder clearQueryType()| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
clearText()
public StructuredQuery.Builder clearText()Optional. A leaf-level text query.
.google.cloud.vectorsearch.v1beta.TextQuery text = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
clearUnary()
public StructuredQuery.Builder clearUnary()Optional. A query that applies a unary operator to a sub-query.
.google.cloud.vectorsearch.v1beta.UnaryQuery unary = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
getBoost()
public float getBoost()Optional. Optional multiplier applied to this query node's contribution to the final relevance score. Must be non-negative; if unset or 0, defaults to 1.0. Values greater than 1.0 increase its influence on ranking, values between 0.0 and 1.0 decrease it.
float boost = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
float |
The boost. |
getCombine()
public CombinedQuery getCombine()Optional. A query that combines multiple sub-queries with a boolean operator.
.google.cloud.vectorsearch.v1beta.CombinedQuery combine = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
CombinedQuery |
The combine. |
getCombineBuilder()
public CombinedQuery.Builder getCombineBuilder()Optional. A query that combines multiple sub-queries with a boolean operator.
.google.cloud.vectorsearch.v1beta.CombinedQuery combine = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
CombinedQuery.Builder |
|
getCombineOrBuilder()
public CombinedQueryOrBuilder getCombineOrBuilder()Optional. A query that combines multiple sub-queries with a boolean operator.
.google.cloud.vectorsearch.v1beta.CombinedQuery combine = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
CombinedQueryOrBuilder |
|
getDefaultInstanceForType()
public StructuredQuery getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
StructuredQuery |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getQueryTypeCase()
public StructuredQuery.QueryTypeCase getQueryTypeCase()| Returns | |
|---|---|
| Type | Description |
StructuredQuery.QueryTypeCase |
|
getText()
public TextQuery getText()Optional. A leaf-level text query.
.google.cloud.vectorsearch.v1beta.TextQuery text = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TextQuery |
The text. |
getTextBuilder()
public TextQuery.Builder getTextBuilder()Optional. A leaf-level text query.
.google.cloud.vectorsearch.v1beta.TextQuery text = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TextQuery.Builder |
|
getTextOrBuilder()
public TextQueryOrBuilder getTextOrBuilder()Optional. A leaf-level text query.
.google.cloud.vectorsearch.v1beta.TextQuery text = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TextQueryOrBuilder |
|
getUnary()
public UnaryQuery getUnary()Optional. A query that applies a unary operator to a sub-query.
.google.cloud.vectorsearch.v1beta.UnaryQuery unary = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
UnaryQuery |
The unary. |
getUnaryBuilder()
public UnaryQuery.Builder getUnaryBuilder()Optional. A query that applies a unary operator to a sub-query.
.google.cloud.vectorsearch.v1beta.UnaryQuery unary = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
UnaryQuery.Builder |
|
getUnaryOrBuilder()
public UnaryQueryOrBuilder getUnaryOrBuilder()Optional. A query that applies a unary operator to a sub-query.
.google.cloud.vectorsearch.v1beta.UnaryQuery unary = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
UnaryQueryOrBuilder |
|
hasCombine()
public boolean hasCombine()Optional. A query that combines multiple sub-queries with a boolean operator.
.google.cloud.vectorsearch.v1beta.CombinedQuery combine = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the combine field is set. |
hasText()
public boolean hasText()Optional. A leaf-level text query.
.google.cloud.vectorsearch.v1beta.TextQuery text = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the text field is set. |
hasUnary()
public boolean hasUnary()Optional. A query that applies a unary operator to a sub-query.
.google.cloud.vectorsearch.v1beta.UnaryQuery unary = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the unary field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeCombine(CombinedQuery value)
public StructuredQuery.Builder mergeCombine(CombinedQuery value)Optional. A query that combines multiple sub-queries with a boolean operator.
.google.cloud.vectorsearch.v1beta.CombinedQuery combine = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
CombinedQuery |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
mergeFrom(StructuredQuery other)
public StructuredQuery.Builder mergeFrom(StructuredQuery other)| Parameter | |
|---|---|
| Name | Description |
other |
StructuredQuery |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public StructuredQuery.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public StructuredQuery.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
mergeText(TextQuery value)
public StructuredQuery.Builder mergeText(TextQuery value)Optional. A leaf-level text query.
.google.cloud.vectorsearch.v1beta.TextQuery text = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
TextQuery |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
mergeUnary(UnaryQuery value)
public StructuredQuery.Builder mergeUnary(UnaryQuery value)Optional. A query that applies a unary operator to a sub-query.
.google.cloud.vectorsearch.v1beta.UnaryQuery unary = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
UnaryQuery |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
setBoost(float value)
public StructuredQuery.Builder setBoost(float value)Optional. Optional multiplier applied to this query node's contribution to the final relevance score. Must be non-negative; if unset or 0, defaults to 1.0. Values greater than 1.0 increase its influence on ranking, values between 0.0 and 1.0 decrease it.
float boost = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
floatThe boost to set. |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
This builder for chaining. |
setCombine(CombinedQuery value)
public StructuredQuery.Builder setCombine(CombinedQuery value)Optional. A query that combines multiple sub-queries with a boolean operator.
.google.cloud.vectorsearch.v1beta.CombinedQuery combine = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
CombinedQuery |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
setCombine(CombinedQuery.Builder builderForValue)
public StructuredQuery.Builder setCombine(CombinedQuery.Builder builderForValue)Optional. A query that combines multiple sub-queries with a boolean operator.
.google.cloud.vectorsearch.v1beta.CombinedQuery combine = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
CombinedQuery.Builder |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
setText(TextQuery value)
public StructuredQuery.Builder setText(TextQuery value)Optional. A leaf-level text query.
.google.cloud.vectorsearch.v1beta.TextQuery text = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
TextQuery |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
setText(TextQuery.Builder builderForValue)
public StructuredQuery.Builder setText(TextQuery.Builder builderForValue)Optional. A leaf-level text query.
.google.cloud.vectorsearch.v1beta.TextQuery text = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
TextQuery.Builder |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
setUnary(UnaryQuery value)
public StructuredQuery.Builder setUnary(UnaryQuery value)Optional. A query that applies a unary operator to a sub-query.
.google.cloud.vectorsearch.v1beta.UnaryQuery unary = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
UnaryQuery |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|
setUnary(UnaryQuery.Builder builderForValue)
public StructuredQuery.Builder setUnary(UnaryQuery.Builder builderForValue)Optional. A query that applies a unary operator to a sub-query.
.google.cloud.vectorsearch.v1beta.UnaryQuery unary = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
UnaryQuery.Builder |
| Returns | |
|---|---|
| Type | Description |
StructuredQuery.Builder |
|