Reference documentation and code samples for the Google Cloud Vector Search V1 Client class StructuredQuery.
A structured query for text search. Allows expressing field-targeted text queries combined via boolean operators, with optional per-node boosting.
Generated from protobuf message google.cloud.vectorsearch.v1.StructuredQuery
Namespace
Google \ Cloud \ VectorSearch \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ text |
TextQuery
Optional. A leaf-level text query. |
↳ unary |
UnaryQuery
Optional. A query that applies a unary operator to a sub-query. |
↳ combine |
CombinedQuery
Optional. A query that combines multiple sub-queries with a boolean operator. |
↳ boost |
float
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. |
getText
Optional. A leaf-level text query.
| Returns | |
|---|---|
| Type | Description |
TextQuery|null |
|
hasText
setText
Optional. A leaf-level text query.
| Parameter | |
|---|---|
| Name | Description |
var |
TextQuery
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUnary
Optional. A query that applies a unary operator to a sub-query.
| Returns | |
|---|---|
| Type | Description |
UnaryQuery|null |
|
hasUnary
setUnary
Optional. A query that applies a unary operator to a sub-query.
| Parameter | |
|---|---|
| Name | Description |
var |
UnaryQuery
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCombine
Optional. A query that combines multiple sub-queries with a boolean operator.
| Returns | |
|---|---|
| Type | Description |
CombinedQuery|null |
|
hasCombine
setCombine
Optional. A query that combines multiple sub-queries with a boolean operator.
| Parameter | |
|---|---|
| Name | Description |
var |
CombinedQuery
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
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.
| Returns | |
|---|---|
| Type | Description |
float |
|
setBoost
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.
| Parameter | |
|---|---|
| Name | Description |
var |
float
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getQueryType
| Returns | |
|---|---|
| Type | Description |
string |
|