Skip to content

Commit

Permalink
feat: add Vector Index API
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 618867415
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 25, 2024
1 parent d81d0b9 commit 277145d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions google/firestore/admin/v1/index.proto
Expand Up @@ -16,6 +16,7 @@ syntax = "proto3";

package google.firestore.admin.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";

option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
Expand Down Expand Up @@ -92,6 +93,25 @@ message Index {
CONTAINS = 1;
}

// The index configuration to support vector search operations
message VectorConfig {
// An index that stores vectors in a flat data structure, and supports
// exhaustive search.
message FlatIndex {}

// 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.
int32 dimension = 1 [(google.api.field_behavior) = REQUIRED];

// The type of index used.
oneof type {
// Indicates the vector index is a flat index.
FlatIndex flat = 2;
}
}

// Can be __name__.
// For single field indexes, this must match the name of the field or may
// be omitted.
Expand All @@ -105,6 +125,10 @@ message Index {

// Indicates that this field supports operations on `array_value`s.
ArrayConfig array_config = 3;

// Indicates that this field supports nearest neighbors and distance
// operations on vector.
VectorConfig vector_config = 4;
}
}

Expand Down

0 comments on commit 277145d

Please sign in to comment.