From 3c9b0e5adf118f7a3999f89ee82274e3fd7fed28 Mon Sep 17 00:00:00 2001 From: Nilthon Jhon Rojas Apumayta <42291959+Jhonnyr97@users.noreply.github.com> Date: Fri, 12 Jan 2024 12:17:09 +0100 Subject: [PATCH] add filter + test --- lib/qdrant/points.rb | 4 +++- spec/qdrant/points_spec.rb | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/qdrant/points.rb b/lib/qdrant/points.rb index 0086599..9a2b380 100644 --- a/lib/qdrant/points.rb +++ b/lib/qdrant/points.rb @@ -47,7 +47,8 @@ def upsert( def delete( collection_name:, points:, wait: nil, - ordering: nil + ordering: nil, + filter: nil ) response = client.connection.post("collections/#{collection_name}/#{PATH}/delete") do |req| req.params["wait"] = wait unless wait.nil? @@ -55,6 +56,7 @@ def delete( req.body = {} req.body["points"] = points + req.body["filter"] = filter unless filter.nil? end response.body end diff --git a/spec/qdrant/points_spec.rb b/spec/qdrant/points_spec.rb index 3ad77cf..3538524 100644 --- a/spec/qdrant/points_spec.rb +++ b/spec/qdrant/points_spec.rb @@ -71,7 +71,8 @@ it "return the data" do response = client.points.delete( collection_name: "test_collection", - points: [3] + points: [3], + filter: [] ) expect(response.dig("status")).to eq("ok") end