You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks in any case.
I hope to be so clear in my issue details to help you finding a solution as soon as possible.
Giorgio
Bug description
Use Case
Use OpenSearch as VectorStore DB with manual config.
When I try to create a OpenSearchClient, I need two items:
transport [instance of org.opensearch.client.transport.rest_clien.RestClientTransport]
options [instance of org.opensearch.client.transport.TransportOptions]
When I try to create a RestClientTransport, I need two items:
restClient [instance of org.opensearch.client.RestClient]
mapper [instance of org.opensearch.client.json.JsonpMapper]
Failure
I can't create an instance of org.opensearch.client.RestClient because of the class is in dependencies set, but is not visible in IDE due to duplicate package name:
1. package org.opensearch.client in dependency opensearch-java-2.10.1.jar
2. package org.opensearch.client in dependency opensearch-rest-client-2.12.0.jar
The order is the same order in gradle dependency list
The first package hides the second one, so org.opensearch.client.RestClient (opensearch-rest-client-2.12.0.jar) is not visible.
Environment
IDE details
IntelliJ IDEA 2024.3.3 (Community Edition)
Build #IC-243.24978.46, built on February 11, 2025
Runtime version: 21.0.6+8-b631.39 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Gradle version (local install): 8.12
Maven version (bundle): 3.9.9
build.gradle details
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.5'
id 'io.spring.dependency-management' version '1.1.6'
//id 'org.jsonschema2pojo' version '1.2.2'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
}
ext {
// verison of spring BOM
set('springAiVersion', "1.0.0-SNAPSHOT")
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.apache.commons:commons-lang3:3.14.0'
implementation 'org.springframework.ai:spring-ai-openai'
implementation 'org.springframework.ai:spring-ai-opensearch-store'
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
implementation 'ch.qos.logback.contrib:logback-json-classic:0.1.5'
implementation 'ch.qos.logback.contrib:logback-jackson:0.1.5'
// support for Java 8 date/time type java.time.LocalDate not supported by default
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2'
}
dependencyManagement {
imports {
mavenBom "org.springframework.ai:spring-ai-bom:${springAiVersion}"
}
}
Steps to reproduce
Create a simple SpringBoot project and try to use OpenSearch as vector db with manual config
restClient -> instance of org.opensearch.client.RestClient (desiderata)
JacksonJsonpMapper mapper = new JacksonJsonpMapper();
RestClientTransport transport = new RestClientTransport(restClient,mapper);
TransportOptions options = TransportOptions.builder().build();
OpenSearchClient client = new OpenSearchClient(transport, options);
The text was updated successfully, but these errors were encountered:
First of all, thanks in any case.
I hope to be so clear in my issue details to help you finding a solution as soon as possible.
Giorgio
Bug description
Use Case
Use OpenSearch as VectorStore DB with manual config.
When I try to create a OpenSearchClient, I need two items:
When I try to create a RestClientTransport, I need two items:
Failure
I can't create an instance of org.opensearch.client.RestClient because of the class is in dependencies set, but is not visible in IDE due to duplicate package name:
The order is the same order in gradle dependency list
The first package hides the second one, so org.opensearch.client.RestClient (opensearch-rest-client-2.12.0.jar) is not visible.
Environment
IDE details
IntelliJ IDEA 2024.3.3 (Community Edition)
Build #IC-243.24978.46, built on February 11, 2025
Runtime version: 21.0.6+8-b631.39 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Gradle version (local install): 8.12
Maven version (bundle): 3.9.9
build.gradle details
Steps to reproduce
Create a simple SpringBoot project and try to use OpenSearch as vector db with manual config
Expected behavior
Use the OpenSearch library with manual configuration, as showed in https://docs.spring.io/spring-ai/reference/api/vectordbs/opensearch.html
Minimal Complete Reproducible example
The text was updated successfully, but these errors were encountered: