Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-07-2020 10:20 PM
hi,
We have a business requirement to compare two graphs for equality.
After searching i found a MD5 example from apoc. Although it is resulting error as it simply uses string values from creating hash. i.e. it does a to string of whole node object.
the fingertrprintgraph functions seems more well equipped but it has no provision to to use it on a specific graph. it works on complete db.
Can anyone help me out here..
01-08-2020 09:11 AM
Hello,
Welcome to the community.
Although I have not used the function apoc.util.md5(results), however if you see the documentation it just gives the md5 hash value for the data in results
https://neo4j-contrib.github.io/neo4j-apoc-procedures/index32.html
Also the reference document you had shared
In short there is no meaning to compare two graph in whole because there is high chance that their id written differently, however you can compare subgraph which are very much similar in file content.
We cannot compare group of two people
(A,B,C) Vs (C,B,A) however we can compare A vs A.
Regards
Vivek
01-15-2020 04:38 AM
Hi Vivek,
Unfortunately my need is to compare two graphs as each graph as a whole signifies a unique data.
The fingertrprintgraph method does exactly that although it doesn't take a list of nodes as input and takes the whole db as context.
Thanks,
Sayon
01-15-2020 11:03 AM
Hi Sayonsur,
This really great that you got your answer.
I am not much aware of this and will go to read some white paper on the same.. However how how would you implement fingerprintgraph. Could you please give some ray of light so that I can start my finding from that angle.
Regards
Vivek
01-15-2020 01:48 PM
Sayonsur
When you tested the MD5 function, did you use an approach like this for ordering?
If that link doesn't help, could you explain further or provide an example of what you mean by this:
We had issues where the property orders in a node is altered and MD5 is not working.
All the sessions of the conference are now available online