Skip to content

Conversation

@bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Sep 9, 2025

Reference property static factory

// Before
.properties(Property.reference("hasAward", "Oscars", "Grammys"))
// After
.properties(ReferenceProperty.to("hasAward", "Oscars", "Grammys"))

Improved String representation of Vectors

var vector = Vectors.of(new float[][] { { 1, 2, 3 }, { 1, 2, 3 } });
vector.toString();
// Outputs:
//     Vectors(default=[[1.0, 2.0, 3.0], [1.0, 2.0, 3.0]])

Renamed connection helpers + liveness check

// Before
WeaviateClient.local();
WeaviateClient.wcd("cluster-url", "api-key");
WeaviateClient.custom(conn -> conn);
// After
WeaviateClient.connectToLocal();
WeaviateClient.connectToWeaviateCloud("cluster-url", "api-key");
WeaviateClient.connectToCustom(conn -> conn);

If the instance does not respond to a liveness check (GET /live) the constructor (and the helper factories) will throw an exception and dispose of any resources obtained thus far (HTTP client).

// Before (Weaviate is down)
try (var client = WeaviateClient.local()) {
  client.collections.create("FirstCollection");  // <- throws IOException 
} catch (IOException e) {
  // Weaviate is down, but had to wait until the first query to find out.
}

// After (Weaviate is down)
try (var client = WeaviateClient.local()) { // <- throws WeaviateConnectException
    client.collections.create("FirstCollection");
} catch (WeaviateConnectException e) {
    // Weaviate is down!
} catch (IOException e) {
   // Something else is wrong.
}

The examples show WeaviateClient, but the same is of course true for WeaviateAsyncClient.

Local configuration parameters

// Before
WeaviateClient.connectToLocal(conn -> conn.httpPort(8081));
// After
WeaviateClient.connectToLocal(conn -> conn.port(8081));

VectorConfig

// Before
.vectors(Vectorizer.text2vecWeaviate(t2v -> t2v.sourceProperties("title")))
// After
.vectorConfig(VectorConfig.text2vecWeaviate(t2v -> t2v.sourceProperties("title")))

Quantization

.vectorConfig(
  VectorConfig.text2vecWeaviate(
    "title_vec",
    t2v -> t2v.quantization(Quantization.bq(bq -> bq.rescoreLimit(6)))
  ),
  VectorConfig.text2vecCohere(
    "body_vec",
    t2v -> t2v.quantization(Quantization.sq(sq -> sq.cache(true)))
  )
)

Max gRPC message size

The client now fetches server's metadata at startup and sets an inbound/outbound grpc_max_message_size to match the value configured on the server.

@bevzzz bevzzz self-assigned this Sep 9, 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 force-pushed the v6-user-testing-feedback branch from 293c0ef to 5a0cc09 Compare September 15, 2025 15:32
@bevzzz bevzzz marked this pull request as ready for review September 16, 2025 10:18
@bevzzz bevzzz requested a review from a team as a code owner September 16, 2025 10:30
1) Ping /live endpoint once we have the RestTransport
but before the client is fully initialized. If the
instance is not reachable, close the existing resouces
and throw a WeaviateConnectException.

The user can catch that earlier in their application,
e.g. at startup, not when they send the first request.

2) Renamed connection helper methods:
- local -> connectToLocal
- wcd -> connectToWeaviateCloud
- custom -> connectToCustom
@bevzzz bevzzz force-pushed the v6-user-testing-feedback branch from d722fa1 to cab1067 Compare September 16, 2025 10:34
@sebawita
Copy link

Hey @bevzzz this is all great 😃

@bevzzz bevzzz merged commit 2241daa into v6 Sep 19, 2025
2 checks passed
@bevzzz bevzzz deleted the v6-user-testing-feedback branch September 19, 2025 10:43
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.

2 participants