How can I merge 2 nodes based on similarity? For example, there are 2 nodes 'battery issues' and 'bad battery', which will have a high cosine similarity. I want to merge these kind od nodes in my graph based on cosine similarity.
I would imagine you need to identify each pair of nodes want won’t merged based on the magnitude of their cosine similarity. Have you calculated the similarity score for the candidate nodes to merge?
Then you need to define what you mean by merge, as each node could have different labels (as in the example you gave) and properties that have the same key but different values. What about the relations? How do you want to resolve these differences?
The apoc library has some functionality that may help you.