Skip to content

Commit 277145d

Browse files
Google APIscopybara-github
authored andcommitted
feat: add Vector Index API
PiperOrigin-RevId: 618867415
1 parent d81d0b9 commit 277145d

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

google/firestore/admin/v1/index.proto

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ syntax = "proto3";
1616

1717
package google.firestore.admin.v1;
1818

19+
import "google/api/field_behavior.proto";
1920
import "google/api/resource.proto";
2021

2122
option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
@@ -92,6 +93,25 @@ message Index {
9293
CONTAINS = 1;
9394
}
9495

96+
// The index configuration to support vector search operations
97+
message VectorConfig {
98+
// An index that stores vectors in a flat data structure, and supports
99+
// exhaustive search.
100+
message FlatIndex {}
101+
102+
// Required. The vector dimension this configuration applies to.
103+
//
104+
// The resulting index will only include vectors of this dimension, and
105+
// can be used for vector search with the same dimension.
106+
int32 dimension = 1 [(google.api.field_behavior) = REQUIRED];
107+
108+
// The type of index used.
109+
oneof type {
110+
// Indicates the vector index is a flat index.
111+
FlatIndex flat = 2;
112+
}
113+
}
114+
95115
// Can be __name__.
96116
// For single field indexes, this must match the name of the field or may
97117
// be omitted.
@@ -105,6 +125,10 @@ message Index {
105125

106126
// Indicates that this field supports operations on `array_value`s.
107127
ArrayConfig array_config = 3;
128+
129+
// Indicates that this field supports nearest neighbors and distance
130+
// operations on vector.
131+
VectorConfig vector_config = 4;
108132
}
109133
}
110134

0 commit comments

Comments
 (0)