Skip to content

Commit 8ca6f40

Browse files
committed
for the delete method you need to provide points or filter
1 parent 7c271d0 commit 8ca6f40

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/qdrant/points.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,21 @@ def upsert(
4646
# Delete points
4747
def delete(
4848
collection_name:,
49-
points:, wait: nil,
49+
points: nil,
50+
wait: nil,
5051
ordering: nil,
5152
filter: nil
5253
)
54+
55+
raise ArgumentError, "Either points or filter should be provided" if points.nil? && filter.nil?
56+
5357
response = client.connection.post("collections/#{collection_name}/#{PATH}/delete") do |req|
5458
req.params["wait"] = wait unless wait.nil?
5559
req.params["ordering"] = ordering unless ordering.nil?
5660

5761
req.body = {}
58-
req.body["points"] = points
62+
63+
req.body["points"] = points unless filter.nil?
5964
req.body["filter"] = filter unless filter.nil?
6065
end
6166
response.body

0 commit comments

Comments
 (0)