Skip to content

Commit

Permalink
add filter + test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhonnyr97 committed Jan 12, 2024
1 parent 070407a commit 3c9b0e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/qdrant/points.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ 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?
req.params["ordering"] = ordering unless ordering.nil?

req.body = {}
req.body["points"] = points
req.body["filter"] = filter unless filter.nil?
end
response.body
end
Expand Down
3 changes: 2 additions & 1 deletion spec/qdrant/points_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c9b0e5

Please sign in to comment.