Cloud Firestore V1 Client - Class IndexField (2.3.3)

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

A field in an index.

The field_path describes which field is indexed, the value_mode describes how the field value is indexed.

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

Namespace

Google \ Cloud \ Firestore \ Admin \ V1 \ Index

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ field_path string

Can be name. For single field indexes, this must match the name of the field or may be omitted.

↳ order int

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

↳ array_config int

Indicates that this field supports operations on array_values.

↳ vector_config IndexField\VectorConfig

Indicates that this field supports nearest neighbor and distance operations on vector.

↳ search_config IndexField\SearchConfig

Indicates that this field supports search operations. This field is only currently supported for indexes with MONGODB_COMPATIBLE_API ApiScope.

getFieldPath

Can be name.

For single field indexes, this must match the name of the field or may be omitted.

Returns
Type Description
string

setFieldPath

Can be name.

For single field indexes, this must match the name of the field or may be omitted.

Parameter
Name Description
var string
Returns
Type Description
$this

getOrder

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

Returns
Type Description
int Enum of type Order.

hasOrder

setOrder

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

Parameter
Name Description
var int

Enum of type Order.

Returns
Type Description
$this

getArrayConfig

Indicates that this field supports operations on array_values.

Returns
Type Description
int Enum of type ArrayConfig.

hasArrayConfig

setArrayConfig

Indicates that this field supports operations on array_values.

Parameter
Name Description
var int

Enum of type ArrayConfig.

Returns
Type Description
$this

getVectorConfig

Indicates that this field supports nearest neighbor and distance operations on vector.

Returns
Type Description
IndexField\VectorConfig|null

hasVectorConfig

setVectorConfig

Indicates that this field supports nearest neighbor and distance operations on vector.

Parameter
Name Description
var IndexField\VectorConfig
Returns
Type Description
$this

getSearchConfig

Indicates that this field supports search operations. This field is only currently supported for indexes with MONGODB_COMPATIBLE_API ApiScope.

Returns
Type Description
IndexField\SearchConfig|null

hasSearchConfig

setSearchConfig

Indicates that this field supports search operations. This field is only currently supported for indexes with MONGODB_COMPATIBLE_API ApiScope.

Parameter
Name Description
var IndexField\SearchConfig
Returns
Type Description
$this

getValueMode

Returns
Type Description
string