Skip to content

AzureVectorStore throws UnsupportedOperationException when performing similarity search due to immutable metadata map #4117

@abalosache

Description

@abalosache

Bug Description

The AzureVectorStore throws an UnsupportedOperationException when performing similarity searches. The error occurs because the code attempts to modify an immutable metadata map during result processing.

Environment

  • Spring AI version: 1.0.1
  • Java version: 21

Steps to Reproduce

  1. Configure AzureVectorStore with Azure AI Search backend
  2. Index documents using Azure AI Search indexer with skillset (document chunking and embedding generation)
  3. Perform a similarity search using Spring AI's VectorStore interface:
    List<Document> results = vectorStore.similaritySearch("your query here");

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions