Bug description In the spring-ai-docs repository, within the file src/main/antora/modules/ROOT/pages/api/vectordbs/couchbase.adoc, the provided Java code snippet for manually configuring the Couchbase Cluster bean is missing a return statement. This results in a compilation error due to the method not returning a Cluster instance. Ensuring accurate code snippets in documentation is crucial for developers referencing them. Including the return statement aligns with proper Java practices and prevents potential confusion.

Environment Spring AI version : 0.8.0 Java version : 17 Vector store: Couchbase

Steps to reproduce

  1. Copy the provided cluster() method from the documentation into a Spring Boot application.
  2. Attempt to compile the application.

Expected behavior The application should compile successfully with the cluster() method returning a valid Cluster instance.

Minimal Complete Reproducible example The current code in the documentation:

@Bean
public Cluster cluster() {
    Cluster cluster = Cluster.connect("couchbase://localhost", "username", "password");
}

This will result in a missing return statement error.

Proposed Fix To fix this issue, the method should explicitly return the Cluster instance:

@Bean
public Cluster cluster() {
    return Cluster.connect("couchbase://localhost", "username", "password");
}