@@ -177,6 +177,11 @@ class IndexField(proto.Message):
177
177
Indicates that this field supports operations on
178
178
``array_value``\ s.
179
179
180
+ This field is a member of `oneof`_ ``value_mode``.
181
+ vector_config (google.cloud.firestore_admin_v1.types.Index.IndexField.VectorConfig):
182
+ Indicates that this field supports nearest
183
+ neighbors and distance operations on vector.
184
+
180
185
This field is a member of `oneof`_ ``value_mode``.
181
186
"""
182
187
@@ -211,6 +216,41 @@ class ArrayConfig(proto.Enum):
211
216
ARRAY_CONFIG_UNSPECIFIED = 0
212
217
CONTAINS = 1
213
218
219
+ class VectorConfig (proto .Message ):
220
+ r"""The index configuration to support vector search operations
221
+
222
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
223
+
224
+ Attributes:
225
+ dimension (int):
226
+ Required. The vector dimension this
227
+ configuration applies to.
228
+ The resulting index will only include vectors of
229
+ this dimension, and can be used for vector
230
+ search with the same dimension.
231
+ flat (google.cloud.firestore_admin_v1.types.Index.IndexField.VectorConfig.FlatIndex):
232
+ Indicates the vector index is a flat index.
233
+
234
+ This field is a member of `oneof`_ ``type``.
235
+ """
236
+
237
+ class FlatIndex (proto .Message ):
238
+ r"""An index that stores vectors in a flat data structure, and
239
+ supports exhaustive search.
240
+
241
+ """
242
+
243
+ dimension : int = proto .Field (
244
+ proto .INT32 ,
245
+ number = 1 ,
246
+ )
247
+ flat : "Index.IndexField.VectorConfig.FlatIndex" = proto .Field (
248
+ proto .MESSAGE ,
249
+ number = 2 ,
250
+ oneof = "type" ,
251
+ message = "Index.IndexField.VectorConfig.FlatIndex" ,
252
+ )
253
+
214
254
field_path : str = proto .Field (
215
255
proto .STRING ,
216
256
number = 1 ,
@@ -227,6 +267,12 @@ class ArrayConfig(proto.Enum):
227
267
oneof = "value_mode" ,
228
268
enum = "Index.IndexField.ArrayConfig" ,
229
269
)
270
+ vector_config : "Index.IndexField.VectorConfig" = proto .Field (
271
+ proto .MESSAGE ,
272
+ number = 4 ,
273
+ oneof = "value_mode" ,
274
+ message = "Index.IndexField.VectorConfig" ,
275
+ )
230
276
231
277
name : str = proto .Field (
232
278
proto .STRING ,
0 commit comments