Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-03-2019 06:45 AM
Hi,
I am using the following query with two nodes with names -applicationname and username and they lie within the same level .i.e. they are connected to the same node. Ain't there a similarity between them ?
If yes , why doesn't it show and if not which algorithm and query is suitable to find there similairty.
MATCH (p1 {name: 'applicationname'})-[*]->(cuisine1)
WITH p1, collect(id(cuisine1)) AS p1Parameter
MATCH (p2 {name: "username"})-[*]->(cuisine2)
WITH p1, p1Parameter, p2, collect(id(cuisine2)) AS p2Parameter
RETURN p1.value, p1.apiName AS from,
p2.value, p2.apiName AS to,
algo.similarity.jaccard(p1Parameter, p2Parameter) AS similarity
image of the node connection -
12-30-2019 03:43 PM
From the diagram it looks like the relationship direction is opposite to what you have mentioned in the code. Can you switch the relationship direction and try again?
All the sessions of the conference are now available online