Skip to content

Conversation

@thisishwan2
Copy link
Contributor

Fixes GH-5191

Description

This PR fixes a bug where the doAdd method in Neo4jVectorStore was ignoring the user-configured sessionConfig.

Previously, doAdd initialized the session using this.driver.session(), which falls back to the default database configuration. This caused connection errors when a custom database name was specified in Neo4jVectorStoreConfig.

Changes:

  • Updated doAdd to use this.driver.session(this.sessionConfig) to ensure the configured session settings (e.g., database name) are respected.

Verification

  • I have verified that the code compiles successfully.
  • The fix aligns with how other methods (like doDelete or doSearch) initialize the session in this class.

@ilayaperumalg ilayaperumalg self-assigned this Jan 7, 2026
@ilayaperumalg ilayaperumalg added this to the 2.0.0.M2 milestone Jan 7, 2026
@ilayaperumalg ilayaperumalg added bug Something isn't working for: backport-to-1.1.x labels Jan 7, 2026
@ilayaperumalg ilayaperumalg merged commit 042d9a7 into spring-projects:main Jan 7, 2026
1 check passed
@ilayaperumalg
Copy link
Member

@thisishwan2 Thanks for the PR! Rebased and merged via 042d9a7. Also, added integration tests to validate the changes via f3445d1.

Pushed the changes into 1.1.x as well via 99127f6 and 3293a20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Neo4jVectorStore doAdd method ignores sessionConfig

2 participants