Google Cloud Vector Search V1 Client - Class TextQuery (0.11.0)

Reference documentation and code samples for the Google Cloud Vector Search V1 Client class TextQuery.

A 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).

Generated from protobuf message google.cloud.vectorsearch.v1.TextQuery

Namespace

Google \ Cloud \ VectorSearch \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ text string

Required. The text to search for.

↳ fields string[]

Required. The data fields to search against.

↳ match_type int

Optional. The matching strategy to apply for this query. If unset, defaults to TEXT.

↳ query_enhancement QueryEnhancement

Optional. The query enhancement settings to apply for this query.

getText

Required. The text to search for.

Returns
Type Description
string

setText

Required. The text to search for.

Parameter
Name Description
var string
Returns
Type Description
$this

getFields

Required. The data fields to search against.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setFields

Required. The data fields to search against.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getMatchType

Optional. The matching strategy to apply for this query. If unset, defaults to TEXT.

Returns
Type Description
int Enum of type MatchType.

setMatchType

Optional. The matching strategy to apply for this query. If unset, defaults to TEXT.

Parameter
Name Description
var int

Enum of type MatchType.

Returns
Type Description
$this

getQueryEnhancement

Optional. The query enhancement settings to apply for this query.

Returns
Type Description
QueryEnhancement|null

hasQueryEnhancement

clearQueryEnhancement

setQueryEnhancement

Optional. The query enhancement settings to apply for this query.

Parameter
Name Description
var QueryEnhancement
Returns
Type Description
$this