Added ability to remove all records from the database.

This commit is contained in:
2026-01-16 23:13:10 -05:00
parent cb4488ee58
commit d850c5a6e0
2 changed files with 38 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ public interface IQdrantService
Task StoreAddressAsync(Address address, float[] embedding, CancellationToken cancellationToken = default);
Task<List<AddressEmbedding>> SearchSimilarAddressesAsync(float[] queryEmbedding, int limit = 5, float scoreThreshold = 0.0f, CancellationToken cancellationToken = default);
Task<List<AddressEmbedding>> GetAllAddressesAsync(CancellationToken cancellationToken = default);
Task DeleteAllAddressesAsync(CancellationToken cancellationToken = default);
}
public class QdrantService : IQdrantService
@@ -86,4 +87,9 @@ public class QdrantService : IQdrantService
}
return addresses;
}
public async Task DeleteAllAddressesAsync(CancellationToken cancellationToken = default)
{
await _client.DeleteAsync(_collectionName, filter: new Filter(), cancellationToken: cancellationToken);
}
}