Google Cloud Vector Search V1 Client - Class TextSearch (0.2.0)

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

Defines a text search operation.

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

Namespace

Google \ Cloud \ VectorSearch \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ search_text string

Required. The query text.

↳ data_field_names array

Required. The data field names to search.

↳ output_fields OutputFields

Optional. The fields to return in the search results.

↳ top_k int

Optional. The number of results to return.

↳ filter Google\Protobuf\Struct

Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.

getSearchText

Required. The query text.

Returns
Type Description
string

setSearchText

Required. The query text.

Parameter
Name Description
var string
Returns
Type Description
$this

getDataFieldNames

Required. The data field names to search.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setDataFieldNames

Required. The data field names to search.

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

getOutputFields

Optional. The fields to return in the search results.

Returns
Type Description
OutputFields|null

hasOutputFields

clearOutputFields

setOutputFields

Optional. The fields to return in the search results.

Parameter
Name Description
var OutputFields
Returns
Type Description
$this

getTopK

Optional. The number of results to return.

Returns
Type Description
int

hasTopK

clearTopK

setTopK

Optional. The number of results to return.

Parameter
Name Description
var int
Returns
Type Description
$this

getFilter

Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.

Returns
Type Description
Google\Protobuf\Struct|null

hasFilter

clearFilter

setFilter

Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.

Parameter
Name Description
var Google\Protobuf\Struct
Returns
Type Description
$this