Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-03-2021 01:06 AM
I ran similarity algo (GDS) on a memory graph, this gives me this result (showing the result in the table format):
If I want to return the top similarity pair, I can use limit 1 instead of 3 to get the top result. (Result with the maximum similarity).
But I want to only return the third most similar similarity pair, how can I do that?
Basically, my result should be something like this:
Solved! Go to Solution.
06-03-2021 02:58 AM
Hello @abhishekjayant1111
You should have a look at SKIP, in your case:
ORDER BY similarity DESC SKIP 2 LIMIT 1
Regards,
Cobra
06-03-2021 02:58 AM
Hello @abhishekjayant1111
You should have a look at SKIP, in your case:
ORDER BY similarity DESC SKIP 2 LIMIT 1
Regards,
Cobra
06-03-2021 03:33 AM
Hi @Cobra , thanks for helping out again . This is exactly what I wanted.
However, can you also tell me how to exclude the duplicate similarity pair when I run the node similarity algo. I've shown the duplicate pairs below:
I get these duplicate pairs, how can I get rid of these?
PS: I do now want to use write mode, only want to use stream.
06-03-2021 04:44 AM
You can modify your WHERE
clause like this:
WHERE n1:Adverse_Event
AND n2:Adverse_Event
AND id(n1) > id(n2)
06-03-2021 05:44 AM
Solved the problem. Thank you so much!
All the sessions of the conference are now available online