Skip to content

Commit

Permalink
feat: add detail to MVI list indexes RPC (#239)
Browse files Browse the repository at this point in the history
Previously the list indexes RPC only returned a list of index
names. This PR modifies this to return a list of index detail
containing index name, num dimensions, and similarity metric.

We also factor out the similarity metric message from the
`CreateIndexRequest` since it is common to create index, list indexes,
and (in the future) describe index.

Because the service is in early beta we have carefully weighed
changing this and have agreed the earlier the better.
  • Loading branch information
malandis authored Nov 14, 2023
1 parent 72cb995 commit 53795b9
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions proto/controlclient.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,29 @@ service ScsControl {
rpc ListIndexes(_ListIndexesRequest) returns (_ListIndexesResponse) {}
}

message _CreateIndexRequest {
message _EuclideanSimilarity{}
message _SimilarityMetric {
message _EuclideanSimilarity {
}

message _InnerProduct{}
message _InnerProduct {
}

message _CosineSimilarity {
}

message _CosineSimilarity{}
string index_name = 1;
uint64 num_dimensions = 2;
oneof similarity_metric {
_EuclideanSimilarity euclidean_similarity = 3;
_InnerProduct inner_product = 4;
_CosineSimilarity cosine_similarity = 5;
_EuclideanSimilarity euclidean_similarity = 1;
_InnerProduct inner_product = 2;
_CosineSimilarity cosine_similarity = 3;
}
}

message _CreateIndexRequest {
string index_name = 1;
uint64 num_dimensions = 2;
_SimilarityMetric similarity_metric = 3;
}

message _CreateIndexResponse {
}

Expand All @@ -50,7 +58,12 @@ message _ListIndexesRequest {
}

message _ListIndexesResponse {
repeated string index_names = 1;
message _Index {
string index_name = 1;
uint64 num_dimensions = 2;
_SimilarityMetric similarity_metric = 3;
}
repeated _Index indexes = 1;
}

message _DeleteCacheRequest {
Expand Down

0 comments on commit 53795b9

Please sign in to comment.