Cloud Firestore V1 Client - Class VectorConfig (1.46.0)

Reference documentation and code samples for the Cloud Firestore V1 Client class VectorConfig.

The index configuration to support vector search operations

Generated from protobuf message google.firestore.admin.v1.Index.IndexField.VectorConfig

Namespace

Google \ Cloud \ Firestore \ Admin \ V1 \ Index \ IndexField

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ dimension int

Required. The vector dimension this configuration applies to. The resulting index will only include vectors of this dimension, and can be used for vector search with the same dimension.

↳ flat Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex

Indicates the vector index is a flat index.

getDimension

Required. The vector dimension this configuration applies to.

The resulting index will only include vectors of this dimension, and can be used for vector search with the same dimension.

Returns
Type Description
int

setDimension

Required. The vector dimension this configuration applies to.

The resulting index will only include vectors of this dimension, and can be used for vector search with the same dimension.

Parameter
Name Description
var int
Returns
Type Description
$this

getFlat

Indicates the vector index is a flat index.

Returns
Type Description
Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex|null

hasFlat

setFlat

Indicates the vector index is a flat index.

Parameter
Name Description
var Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex
Returns
Type Description
$this

getType

Returns
Type Description
string