diff --git a/src/Momento.Sdk/IPreviewVectorIndexClient.cs b/src/Momento.Sdk/IPreviewVectorIndexClient.cs index c7c7b9b9..b97e91f0 100644 --- a/src/Momento.Sdk/IPreviewVectorIndexClient.cs +++ b/src/Momento.Sdk/IPreviewVectorIndexClient.cs @@ -103,7 +103,7 @@ public interface IPreviewVectorIndexClient : IDisposable /// } /// /// - public Task DeleteIndexesAsync(string indexName); + public Task DeleteIndexAsync(string indexName); /// /// Upserts a batch of items into a vector index. diff --git a/src/Momento.Sdk/PreviewVectorIndexClient.cs b/src/Momento.Sdk/PreviewVectorIndexClient.cs index 81f34627..6fa3debf 100644 --- a/src/Momento.Sdk/PreviewVectorIndexClient.cs +++ b/src/Momento.Sdk/PreviewVectorIndexClient.cs @@ -49,7 +49,7 @@ public async Task ListIndexesAsync() } /// - public async Task DeleteIndexesAsync(string indexName) + public async Task DeleteIndexAsync(string indexName) { return await controlClient.DeleteIndexAsync(indexName); } diff --git a/tests/Integration/Momento.Sdk.Tests/VectorIndexControlTest.cs b/tests/Integration/Momento.Sdk.Tests/VectorIndexControlTest.cs index 15a1f5b0..b0ca0621 100644 --- a/tests/Integration/Momento.Sdk.Tests/VectorIndexControlTest.cs +++ b/tests/Integration/Momento.Sdk.Tests/VectorIndexControlTest.cs @@ -30,7 +30,7 @@ public async Task CreateListDelete_HappyPath() } finally { - var deleteResponse = await vectorIndexClient.DeleteIndexesAsync(indexName); + var deleteResponse = await vectorIndexClient.DeleteIndexAsync(indexName); Assert.True(deleteResponse is DeleteIndexResponse.Success, $"Unexpected response: {deleteResponse}"); } } @@ -75,7 +75,7 @@ public async Task CreateIndexAsync_InvalidNumDimensions() public async Task DeleteIndexAsync_DoesntExistError() { var indexName = $"index-{Utils.NewGuidString()}"; - var deleteResponse = await vectorIndexClient.DeleteIndexesAsync(indexName); + var deleteResponse = await vectorIndexClient.DeleteIndexAsync(indexName); Assert.True(deleteResponse is DeleteIndexResponse.Error, $"Unexpected response: {deleteResponse}"); var deleteErr = (DeleteIndexResponse.Error)deleteResponse; Assert.Equal(MomentoErrorCode.NOT_FOUND_ERROR, deleteErr.InnerException.ErrorCode); diff --git a/tests/Integration/Momento.Sdk.Tests/VectorIndexDataTest.cs b/tests/Integration/Momento.Sdk.Tests/VectorIndexDataTest.cs index 3fefd629..391a05a7 100644 --- a/tests/Integration/Momento.Sdk.Tests/VectorIndexDataTest.cs +++ b/tests/Integration/Momento.Sdk.Tests/VectorIndexDataTest.cs @@ -86,7 +86,7 @@ public async Task UpsertAndSearch_InnerProduct() } finally { - await vectorIndexClient.DeleteIndexesAsync(indexName); + await vectorIndexClient.DeleteIndexAsync(indexName); } } @@ -123,7 +123,7 @@ public async Task UpsertAndSearch_CosineSimilarity() } finally { - await vectorIndexClient.DeleteIndexesAsync(indexName); + await vectorIndexClient.DeleteIndexAsync(indexName); } } @@ -161,7 +161,7 @@ public async Task UpsertAndSearch_EuclideanSimilarity() } finally { - await vectorIndexClient.DeleteIndexesAsync(indexName); + await vectorIndexClient.DeleteIndexAsync(indexName); } } @@ -197,7 +197,7 @@ public async Task UpsertAndSearch_TopKLimit() } finally { - await vectorIndexClient.DeleteIndexesAsync(indexName); + await vectorIndexClient.DeleteIndexAsync(indexName); } } @@ -271,7 +271,7 @@ public async Task UpsertAndSearch_WithMetadata() } finally { - await vectorIndexClient.DeleteIndexesAsync(indexName); + await vectorIndexClient.DeleteIndexAsync(indexName); } } @@ -314,20 +314,7 @@ public async Task UpsertAndSearch_WithDiverseMetadata() } finally { - await vectorIndexClient.DeleteIndexesAsync(indexName); - } - } - - [Fact] - public async Task TempDeleteAllIndexes() - { - var listResponse = await vectorIndexClient.ListIndexesAsync(); - Assert.True(listResponse is ListIndexesResponse.Success, $"Unexpected response: {listResponse}"); - var listOk = (ListIndexesResponse.Success)listResponse; - foreach (var indexName in listOk.IndexNames) - { - var deleteResponse = await vectorIndexClient.DeleteIndexesAsync(indexName); - Assert.True(deleteResponse is DeleteIndexResponse.Success, $"Unexpected response: {deleteResponse}"); + await vectorIndexClient.DeleteIndexAsync(indexName); } } } \ No newline at end of file