Skip to content

Releases: weaviate/java-client

5.4.0

23 Jul 10:51
88bdd7e
Compare
Choose a tag to compare

This release adds support for these Weaviate v1.32 features:

  • Collection alias: manage collection aliases and associated RBAC permissions-
  • Rotational Quantization: enable RQ in collection configuration
  • RBAC Restore Options: control if roles and db-users should be included in backup restores
  • Replication API: balance the load on the cluster nodes by moving shard replicas

What's Changed

Full Changelog: 5.3.0...5.4.0

6.0.0-beta2 - Hybrid Search, Pagination, Batch Operations, Collection Configuration

09 Jul 09:46
c6e18b2
Compare
Choose a tag to compare

Beta 2 expands the API coverage of client6 to serve most of the common production use cases. We now have complete support for all query types, notably Hybrid Search, provide sync and async Pagination APIs, and support Batch inserts and deletes.

Collection configuration and existing objects can now be updated; data can also be replaced entirely.

🚚 Batch Operations

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

// Insert multiple objects
var balloons = List.of("red", "blue", "green").stream()
    .map(colour -> Map.of("colour", colour))
    .toList();
var inserted = things.data.insertMany(balloons);

// Delete objects that match a condition (make a dry run to see the effect)
things.data.deleteMany(Where.property("price").gte(20), del -> del.dryRun(true));

// Create multiple references
var redBalloon = things.query.byId("red-balloon-uuid");
things.data.referenceAddMany(BatchReference.objects(redBalloon, "belongsTo", clownA, clownB));

🔍 Hybrid, NearObject, and Near Queries

things.query.hybrid("red balloons", hybrid -> hybrid.alpha(.2f).fusionType(Hybrid.FusionType.RANKED));
things.query.nearObject(blueBalloona.uuid());
things.query.nearVideo(base64_encoded_video);

🗂️ Pagination

Synchronous pagination lets you iterate through objects in the traditional for-loop or using the Stream API.

var all = client.paginate(p -> p.pageSize(100));

for (var object : all) {
    System.out.println("uuid="+object.uuid());
}

var first300 = all.stream().take(300).toList();

Asynchronous pagination accepts per-object and per-page (for batch processing) callbacks:

var all = async.paginate();
all.forEach(object -> { ... }); // WeaviateObject
all.forPage(page -> { ... });   // List<WeaviateObject>

💡Vectorizer-first

While the choice of a vector index configuration might be more foundational to your data model conceptually, falling back to the default HNSW is often a sound choice in practice. As a user, it is useful to be able to concentrate on selecting the right vectorizer model and so, our new API puts the vectorizer first.

// Previously:
client.collections.create("MyThings", collection -> collection
    .vectors(named -> named
        .vector("title_vector", Hnsw.of(new Text2VecWeaviateVectorizer()))
        .vector("image_vector", Hnsw.of(new Img2VecNeuralVectorizer()))
    )
);

// With beta2 onwards:
client.collections.create("MyThings", collection -> collection
    .vectors(
        Vectorizer.text2vecWeaviate("title_vector", t2v -> t2v.vectorizeCollectionName(false)),
        Vectorizer.img2vecNeaural("image_vector", i2v -> i2v.imageFields("thumbnail", "img"))
);

If needed, select a different index type or change default HNSW configuration explicitly:

Vectorizer.text2vecWeaviate("image_flat", i2v -> i2v.vectorIndex(Flat.of()))

What's Changed

  • v6: Add, replace, and delete object references by @bevzzz in #393
  • v6: list, deleteAll, exists methods for collections namespace by @bevzzz in #394
  • v6: Add missing data methods by @bevzzz in #395
  • v6: NearObject, Near, and Hybrid queries by @bevzzz in #396
  • v6: Complete collection configuration and missing config functionality by @bevzzz in #397
  • v6: Get and update shard status by @bevzzz in #401
  • v6: Batch Operations (InsertMany, DeleteMany, AddReferencesMany) by @bevzzz in #400
  • v6: Improved configuration options for WeaviateClient(-Async) by @bevzzz in #407
  • v6: Create vector index Vectorizer-first style by @bevzzz in #406
  • v6: Pagination by @bevzzz in #399
  • v6: Update release configuration by @bevzzz in #408

Full Changelog: 6.0.0-beta1...6.0.0-beta2

6.0.0-beta1 - Async Client, Filters, BM25 and FetchObjects Queries, API-Key Authorization

17 Jun 12:48
ce0df8b
Compare
Choose a tag to compare

The first beta of client6 has arrived!

🔑 Use the new API Key authorization to securely connect to your Weaviate instance:

final var client = new WeaviateClient(
    Config.of("https", cfg -> cfg
        .httpHost("localhost").httpPort(443)
        .grpcHost("localhost").grpcPort(433)
        .authorization(Authorization.apiKey("my-api-key"))));

Similarly to Python and TS, client6 offers convenient helper .local() and .wcd() methods for connecting to you local instance or the one running in the Weaviate Cloud.

🔍 Search and retrieve objects using bm25 and fetchObjects queries:

final var books = client.collection.use("Books");

var crimeFiction = books.query.bm25("Sherlock Holmes", q -> q.queryProperties("main_character"));
var newestBooks = books.query.fetchObjects(
    query -> query
        .where(Where.property("yearPublished").gte(2024))
        .limit(200));

Explore other filters and query parameters by downloading the latest version from your local Maven Ce.....

💥 The first beta of client6 has arrived (asynchronously!!!) 💥

The Async Client presents the same familiar API. Its methods return an instance of CompletableFuture so they can be easily integrated with the existing processing pipelines. try it out!

// WeaviateClient and WeaviateClientAsync implement Closable
try (final var asyncClient = client.async()) {
    final var things = asyncClient.collections.use("Things");
    things.data.insert(Map.of("shape", "square"))
        .thenAccept(square -> System.out.println("square has id=" + square.metadata().uuid()));
}

What's Changed

  • v6: Add async client to gRPC endpoints (query / aggregate) by @bevzzz in #383
  • v6: Refactor REST endpoints and JSON de-/serialization by @bevzzz in #387
  • v6: Filters and fetchObjects query by @bevzzz in #388
  • v6: Authorization and connection helpers by @bevzzz in #389
  • v6: add BM25 query by @bevzzz in #390
  • v6: fix async toolchain by @bevzzz in #392

Full Changelog: 6.0.0-alpha2...6.0.0-beta1

5.3.0 - MUVERA, BM25 Search Operator

17 Jun 12:12
541afd8
Compare
Choose a tag to compare

The 5.3.0 release adds support for several major features introduced in Weaviate v1.31.0: BM25 And/Or search operators and MUVERA encoding for multi-vector indices.

We've also extended the collection management API with an ability to add named vectors to existing collections with client.schema().vectorAdder().

What's Changed

  • Add muvera config by @robbespo00 in #382
  • chore: add tests from WeaviateObject.Adapter by @bevzzz in #384
  • Adding named vectors to collections by @bevzzz in #385
  • feat: add searchOperator (minimum_should_match) to bm25 and hybrid arguments by @bevzzz in #386

New Contributors

Full Changelog: 5.2.1...5.3.0

6.0.0-alpha2

12 May 10:21
b3a5f4e
Compare
Choose a tag to compare
6.0.0-alpha2 Pre-release
Pre-release

Further expanding the surface covered by the v6 client. Notably:

  • Aggregations for TEXT and INT properties with optional NearVector filter
  • Reference properties: creating, inserting, retrieving in queries
  • BLOB data type and NearImage search
  • Partial support for NearText search (not possible to select target vectors)
  • New vectorizers: text2vec-contextionary, text2vec-weaviate, multi2vec-clip, and img2vec-neural

What's Changed

  • v6: Aggregate API by @bevzzz in #364
  • v6: Cross-references in collection definition and queries by @bevzzz in #368
  • v6: Implement feedback from Iteration I by @bevzzz in #381

Full Changelog: 6.0.0-alpha1...6.0.0-alpha2

5.2.1 - Security patches

29 Apr 17:11
1192482
Compare
Choose a tag to compare

Upgrade httpclient dependency to v5.4.3 which includes a fix for a high-severity vulnerability.

What's Changed

Full Changelog: 5.2.0...5.2.1

5.2.0 - Dynamic User Management

10 Apr 14:18
1dc69db
Compare
Choose a tag to compare

Dynamic User Management is an extension to the RBAC functionality introduced in Weaviate v1.29, which allows creating new users programmatically as well as managing their roles and API keys.

To avoid name clashes with users authenticated via OIDC, each user is assigned a user type qualifier: db | oidc.
The clients makes working with different types of users easy by providing dedicated methods for each one:

  • users().db() -- dynamically created users and users defined in the server's environment variables
  • users().oidc() -- users using OIDC authentication

To avoid confusion, all users APIs from v5.1.* as well as part of the roles APIs are deprecated in favor of their namespaced counterparts.

Deprecations

  • users().assignedRolesGetter()
  • users().revoker()
  • users().assigner()
  • roles().assignedUsersGetter()

What's Changed

  • feat: support dynamic user management in Weaviate v1.30 by @bevzzz in #369

Full Changelog: 5.1.3...5.2.0

6.0.0-alpha1 - NearVector Search

09 Apr 13:29
ba70b15
Compare
Choose a tag to compare
Pre-release

Preview of the first iteration of the client rewrite, including:

  • Simple collection creation
  • Data management: insert, get, delete
  • Near vector query

What's Changed

  • v6: Collection management and near vector search by @bevzzz in #362

Full Changelog: 5.1.1...6.0.0-alpha1

5.1.3 - Bugfixes and minor improvements

09 Apr 13:27
722085b
Compare
Choose a tag to compare

What's Changed

  • fix(experimental): handle null property values by @bevzzz in #363

Full Changelog: 5.1.2...5.1.3

5.1.2 - Batch error handling

14 Mar 11:53
a8798cd
Compare
Choose a tag to compare

What's Changed

  • fix: return batch errors alongside successfully inserted objects by @bevzzz in #358
  • fix(experimental): make metadata fields public by @bevzzz in #361

Full Changelog: 5.1.1...5.1.2