Class: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1VectorConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/firestore_v1/classes.rb,
lib/google/apis/firestore_v1/representations.rb,
lib/google/apis/firestore_v1/representations.rb

Overview

The index configuration to support vector search operations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleFirestoreAdminV1VectorConfig

Returns a new instance of GoogleFirestoreAdminV1VectorConfig.



2240
2241
2242
# File 'lib/google/apis/firestore_v1/classes.rb', line 2240

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#dimensionFixnum

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. Corresponds to the JSON property dimension

Returns:

  • (Fixnum)


2232
2233
2234
# File 'lib/google/apis/firestore_v1/classes.rb', line 2232

def dimension
  @dimension
end

#flatGoogle::Apis::FirestoreV1::GoogleFirestoreAdminV1FlatIndex

An index that stores vectors in a flat data structure, and supports exhaustive search. Corresponds to the JSON property flat



2238
2239
2240
# File 'lib/google/apis/firestore_v1/classes.rb', line 2238

def flat
  @flat
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2245
2246
2247
2248
# File 'lib/google/apis/firestore_v1/classes.rb', line 2245

def update!(**args)
  @dimension = args[:dimension] if args.key?(:dimension)
  @flat = args[:flat] if args.key?(:flat)
end