spring-projects / spring-ai

An Application Framework for AI Engineering
https://docs.spring.io/spring-ai/reference/index.html
Apache License 2.0
3.14k stars 782 forks source link

Opensearch vector store bugs #1589

Open tstephen1 opened 4 hours ago

tstephen1 commented 4 hours ago

Following the walkthrough in spring ai documenation for opensearch vector store on aws, the following properties are incorrectly located:

spring.opensearch.aws.host spring.opensearch.aws.service-name spring.opensearch.aws.access-key spring.opensearch.aws.secret-key spring.opensearch.aws.region

these only work if located on spring.ai.vectorstore.opensearch.*

else causes error: Caused by: java.lang.NullPointerException: Access key ID cannot be blank.

Also similarity search for index with the following json mapping gives: Similarity search results with error: org.opensearch.client.opensearch._types.OpenSearchException: Request failed: [search_phase_execution_exception] all shards failed

for mapping json: mappingJson: | "properties": { "embedding": { "type": "knn_vector", "dimension": 1536 } }

garc33 commented 3 hours ago

I had exactly the same issue. I fixed it by disabling the json indentation in Jackson ObjectMapper.