Skip to content

Commit c9cd38c

Browse files
committed
Set manageDocumentIds default to true for backward compatibility
The manageDocumentIds flag was initially set to false, which would break existing users who rely on explicit document ID management. This change sets the default to true to preserve the current behavior for all existing OpenSearch users. AWS OpenSearch Serverless users can explicitly opt-in by setting manageDocumentIds(false) when they need auto-generated IDs due to the platform's restrictions on custom document IDs. This ensures backward compatibility while still providing the flexibility needed for AWS Serverless environments. Related: gh-3818 Signed-off-by: sanghun <vitash1215@gmail.com>
1 parent 5d199e2 commit c9cd38c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vector-stores/spring-ai-opensearch-store/src/main/java/org/springframework/ai/vectorstore/opensearch/OpenSearchVectorStore.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
* @author Christian Tzolov
148148
* @author Thomas Vitale
149149
* @author inpink
150+
* @author Sanghun Lee
150151
* @since 1.0.0
151152
*/
152153
public class OpenSearchVectorStore extends AbstractObservationVectorStore implements InitializingBean {
@@ -443,7 +444,7 @@ public static class Builder extends AbstractVectorStoreBuilder<Builder> {
443444

444445
private String similarityFunction = COSINE_SIMILARITY_FUNCTION;
445446

446-
private boolean manageDocumentIds = false;
447+
private boolean manageDocumentIds = true;
447448

448449
/**
449450
* Sets the OpenSearch client.

0 commit comments

Comments
 (0)