Class StructuredQuery (0.21.0)

public final class StructuredQuery extends GeneratedMessage implements StructuredQueryOrBuilder

A 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

Static Fields

BOOST_FIELD_NUMBER

public static final int BOOST_FIELD_NUMBER
Field Value
Type Description
int

COMBINE_FIELD_NUMBER

public static final int COMBINE_FIELD_NUMBER
Field Value
Type Description
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
Type Description
int

UNARY_FIELD_NUMBER

public static final int UNARY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static StructuredQuery getDefaultInstance()
Returns
Type Description
StructuredQuery

getDescriptor()

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

newBuilder()

public static StructuredQuery.Builder newBuilder()
Returns
Type Description
StructuredQuery.Builder

newBuilder(StructuredQuery prototype)

public static StructuredQuery.Builder newBuilder(StructuredQuery prototype)
Parameter
Name Description
prototype StructuredQuery
Returns
Type Description
StructuredQuery.Builder

parseDelimitedFrom(InputStream input)

public static StructuredQuery parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StructuredQuery
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StructuredQuery
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static StructuredQuery parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
StructuredQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StructuredQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StructuredQuery parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
StructuredQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StructuredQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StructuredQuery parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
StructuredQuery
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StructuredQuery
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static StructuredQuery parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StructuredQuery
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StructuredQuery
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static StructuredQuery parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
StructuredQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StructuredQuery
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<StructuredQuery> parser()
Returns
Type Description
Parser<StructuredQuery>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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.

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

getParserForType()

public Parser<StructuredQuery> getParserForType()
Returns
Type Description
Parser<StructuredQuery>
Overrides

getQueryTypeCase()

public StructuredQuery.QueryTypeCase getQueryTypeCase()
Returns
Type Description
StructuredQuery.QueryTypeCase

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public StructuredQuery.Builder newBuilderForType()
Returns
Type Description
StructuredQuery.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected StructuredQuery.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
StructuredQuery.Builder
Overrides

toBuilder()

public StructuredQuery.Builder toBuilder()
Returns
Type Description
StructuredQuery.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException