Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a Document to a neo4j vector store needlessly overwrites all its properties #1932

Open
enricorampazzo opened this issue Dec 14, 2024 · 3 comments · May be fixed by #2070
Open

Adding a Document to a neo4j vector store needlessly overwrites all its properties #1932

enricorampazzo opened this issue Dec 14, 2024 · 3 comments · May be fixed by #2070

Comments

@enricorampazzo
Copy link

Because of this line, when an existing node is added to the vector store, its existing properties are deleted, and only those added as document metadata are persisted.

This is needlessly destructive. I suggest to change line 125 to SET u = properties(u) so that existing properties are preserved

meistermeier added a commit to meistermeier/spring-ai that referenced this issue Jan 15, 2025
@meistermeier
Copy link
Contributor

It was there since the beginning, but I have no exact idea why we / I did this anymore.
I think it was because we wanted to persist the document as it comes in . But if it makes trouble, I have no problem in removing those lines and compress it.

@enricorampazzo
Copy link
Author

Maybe I am using it wrongly, but what I normally do is I create records in a db, with some text I want to embed, and if I want to use that record later, all its properties will be removed, unless I set them in the metadata, which seems clunky, but again, maybe I am missing something

@meistermeier
Copy link
Contributor

There is now the PR (#2070) for this. I also would say it's ok to keep the existing properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants