Append on_disk_payload option
pull/3/head
Ogoun 2 years ago
parent c3376c70ab
commit 452eb8539a

@ -5,18 +5,22 @@
public string name { get; set; } public string name { get; set; }
public string distance { get; set; } public string distance { get; set; }
public int vector_size { get; set; } public int vector_size { get; set; }
public bool? on_disk_payload { get; set; }
} }
internal sealed class CreateCollectionReqeust internal sealed class CreateCollectionReqeust
{ {
public CreateCollectionParameters create_collection { get; set; } public CreateCollectionParameters create_collection { get; set; }
public CreateCollectionReqeust(string name, string distance, int vector_size) public CreateCollectionReqeust(string name, string distance, int vector_size,
bool? on_disk_payload = null)
{ {
create_collection = new CreateCollectionParameters create_collection = new CreateCollectionParameters
{ {
name = name, name = name,
distance = distance, distance = distance,
vector_size = vector_size vector_size = vector_size,
on_disk_payload = on_disk_payload
}; };
} }
} }

@ -49,11 +49,11 @@ namespace ZeroLevel.Qdrant
/// <param name="distance">Cosine or Dot or Euclid</param> /// <param name="distance">Cosine or Dot or Euclid</param>
/// <param name="vector_size">Count of elements in vectors</param> /// <param name="vector_size">Count of elements in vectors</param>
/// <returns></returns> /// <returns></returns>
public async Task<InvokeResult<OperationResponse>> CreateCollection(string name, string distance, int vector_size) public async Task<InvokeResult<OperationResponse>> CreateCollection(string name, string distance, int vector_size, bool? on_disk_payload)
{ {
try try
{ {
var collection = new CreateCollectionReqeust(name, distance, vector_size); var collection = new CreateCollectionReqeust(name, distance, vector_size, on_disk_payload);
var json = JsonConvert.SerializeObject(collection); var json = JsonConvert.SerializeObject(collection);
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
var url = $"/collections"; var url = $"/collections";

Loading…
Cancel
Save

Powered by TurnKey Linux.