From e92512e1aed5eac302d3a0cae162ccfaaba026a8 Mon Sep 17 00:00:00 2001 From: "M. E. Patterson" Date: Fri, 2 Feb 2024 11:51:39 -0600 Subject: [PATCH 1/2] Update objects.rb to pass tenant to batch_delete as param --- lib/weaviate/objects.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/weaviate/objects.rb b/lib/weaviate/objects.rb index 48c3c9e..0293fd8 100644 --- a/lib/weaviate/objects.rb +++ b/lib/weaviate/objects.rb @@ -162,7 +162,8 @@ def batch_delete( where:, consistency_level: nil, output: nil, - dry_run: nil + dry_run: nil, + tenant: nil ) path = "batch/#{PATH}" @@ -181,6 +182,7 @@ def batch_delete( } req.body["output"] = output unless output.nil? req.body["dryRun"] = dry_run unless dry_run.nil? + req.params["tenant"] = tenant unless tenant.nil? end response.body From 73e3ccf2edbc850d2646b758b5303cb22f284d23 Mon Sep 17 00:00:00 2001 From: "M. E. Patterson" Date: Sat, 3 Feb 2024 10:55:18 -0600 Subject: [PATCH 2/2] refactor to set consistency_level thru req.params --- lib/weaviate/objects.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/weaviate/objects.rb b/lib/weaviate/objects.rb index 0293fd8..e1905ca 100644 --- a/lib/weaviate/objects.rb +++ b/lib/weaviate/objects.rb @@ -169,8 +169,6 @@ def batch_delete( unless consistency_level.nil? validate_consistency_level!(consistency_level) - - path << "?consistency_level=#{consistency_level.to_s.upcase}" end response = client.connection.delete(path) do |req| @@ -182,6 +180,7 @@ def batch_delete( } req.body["output"] = output unless output.nil? req.body["dryRun"] = dry_run unless dry_run.nil? + req.params["consistency_level"] = consistency_level.to_s.upcase unless consistency_level.nil? req.params["tenant"] = tenant unless tenant.nil? end