spring-projects / spring-projects/spring-ai

Unable to start app after setting up opensearch vector store

Open
#3,785 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

Bug description
I am trying to set up opensearch as a vector store for embeddings for RAG.

I have added the following dependencies

implementation "org.opensearch.client:spring-data-opensearch-starter:1.8.1"
implementation "org.opensearch.client:opensearch-java:2.25.0"

and this is how I configured the spring ai vector store properties.

spring:
    ai:
        vector-store:
            opensearch:
                initialize-schema: true
                uris: http://localhost:9200

I am running opensearch in a docker container locally. I have other indexes in this opensearch instance and already use it within the app, I just don't use it as a vector store yet so I'm confused why this can't connect to the same instance I am already using.

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of constructor in org.opensearch.spring.boot.autoconfigure.OpenSearchRestClientConfigurations$RestClientBuilderConfiguration required a bean of type 'org.opensearch.spring.boot.autoconfigure.OpenSearchConnectionDetails' that could not be found.


Action:

Consider defining a bean of type 'org.opensearch.spring.boot.autoconfigure.OpenSearchConnectionDetails' in your configuration.

Environment
Java 21, Spring AI 1.0.0, Spring boot 3.5.3, Other dependencies listed above.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the OpenSearchRestClientConfigurations startup error and review the listed Spring AI vector-store properties alongside the OpenSearch dependencies. Reproduce the setup with the provided Java, Spring AI, and Spring Boot versions; done means the application starts and can initialize the OpenSearch vector store against the existing local instance.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.