Skip to content

Conversation

bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Jul 1, 2025

This PR adds support for -Many operations.

var things = client.collections.use("Things");

// Delete many
things.data.deleteMany(Where.property("size").gte(235), out -> out.verbose(true));
things.data.deleteMany("uuid-1", "uuid-2"); // Shorthand for chaining Where.uuid().eq(UUID), but DOES NOT accept options

// Insert many
things.data.insertMany(Map.of("name", "thing-1"), Map.of("thing-2"));
things.data.insertMany(List.of(
  WeaviateObject.of(Map.of("name", "thing-3"), 
    thing -> thing.reference("ownedBy", Reference.uuids("owner-1")),
  // ... more objects
));

// Add multiple references
WeaviateObject<?, ?, ?> myThing;
things.data.referencesAddMany(
   BatchReference.uuids(myThing, "ownedBy", "owner-2", "owner-3"));
// alternatively:
WeaviateObject<?, ?, ?> owner_4;
things.data.referencesAddMany(
   BatchReference.objects(myThing, "ownedBy", owner_4));

@bevzzz bevzzz self-assigned this Jul 1, 2025
Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@bevzzz bevzzz marked this pull request as ready for review July 2, 2025 10:46
@bevzzz bevzzz linked an issue Jul 4, 2025 that may be closed by this pull request
1 task
@bevzzz bevzzz merged commit 6574176 into v6 Jul 4, 2025
2 checks passed
@bevzzz bevzzz deleted the v6-many branch July 4, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batch inserts (gRPC)
1 participant