# How to use topological linkprediction with adamic-adar score in a projected graph on GDS?

**URL:** <https://community.neo4j.com/t/how-to-use-topological-linkprediction-with-adamic-adar-score-in-a-projected-graph-on-gds/58260>\
**Category:** Neo4j Graph Platform\
**Tags:** migrated\
**Created:** [January 5, 2023, 12:09am UTC](https://community.neo4j.com/t/how-to-use-topological-linkprediction-with-adamic-adar-score-in-a-projected-graph-on-gds/58260 "2023-01-05T00:09:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcolongo](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/marcolongo/32/26162_2.png) [@marcolongo](https://community.neo4j.com/u/marcolongo)\
**Post date:** [January 5, 2023, 12:09am UTC](https://community.neo4j.com/t/how-to-use-topological-linkprediction-with-adamic-adar-score-in-a-projected-graph-on-gds/58260/1 "2023-01-05T00:09:37Z")

</div>

Hi,

I am trying to run query like this:

MATCH (n1:Person), (n2:Person)

WHERE NOT (n1)-[:KNOWS]-(n2) AND id(n1) \< id(n2)

WITH gds.alpha.linkprediction.adamicAdar(n1, n2, {relationshipQuery: "KNOWS"}) AS adam\_score, n1, n2,

RETURN n1.name, n2.name, adam\_score  
ORDER BY adam\_score DESC

But the query is taking a lot of time to run. Can i build a similar query onto a projected gds graph? There is any way to optimize this query?

Thanks!
