Skip to content

Commit

Permalink
Fix DropIndexAsync when index name isn't provided
Browse files Browse the repository at this point in the history
  • Loading branch information
roji authored and weianweigan committed Sep 6, 2023
1 parent 7602f46 commit aafbe7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Milvus.Client/MilvusCollection.Index.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ public async Task DropIndexAsync(
{
Verify.NotNullOrWhiteSpace(fieldName);

var request = new DropIndexRequest
var request = new DropIndexRequest { CollectionName = Name, FieldName = fieldName };

if (indexName is not null)
{
CollectionName = Name,
FieldName = fieldName,
IndexName = indexName
};
request.IndexName = indexName;
}

await _client.InvokeAsync(_client.GrpcClient.DropIndexAsync, request, cancellationToken).ConfigureAwait(false);
}
Expand Down

0 comments on commit aafbe7a

Please sign in to comment.