Skip to content

Commit 137f289

Browse files
authored
Allow sparse_vectors to be passed to collections.create
1 parent 78719ab commit 137f289

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/qdrant/collections.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def get(collection_name:)
2020
def create(
2121
collection_name:,
2222
vectors:,
23+
sparse_vectors: nil,
2324
shard_number: nil,
2425
replication_factor: nil,
2526
write_consistency_factor: nil,
@@ -33,6 +34,7 @@ def create(
3334
response = client.connection.put("#{PATH}/#{collection_name}") do |req|
3435
req.body = {}
3536
req.body["vectors"] = vectors
37+
req.body["sparse_vectors"] = sparse_vectors unless sparse_vectors.nil?
3638
req.body["shard_number"] = shard_number unless shard_number.nil?
3739
req.body["replication_factor"] = replication_factor unless replication_factor.nil?
3840
req.body["write_consistency_factor"] = write_consistency_factor unless write_consistency_factor.nil?

0 commit comments

Comments
 (0)