Skip to content

Commit be9b1a1

Browse files
committed
more sorting
1 parent e1c7de4 commit be9b1a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def get_db():
1010
@route('/graph/<article>')
1111
def get_graph(article):
1212
db = get_db()
13-
query = 'MATCH (p:Page {title:"%s"})<-[:Link]-(o:Page),(o) <-[:Link]-(q:Page) With o,count(q) as rel_count RETURN o.title as link_title, rel_count LIMIT 100' % article.replace("_"," ")
13+
query = 'MATCH (p:Page {title:"%s"})<-[:Link]-(o:Page),(o) <-[:Link]-(q:Page) With o,count(q) as rel_count RETURN o.title as link_title, rel_count ORDER BY rel_count DESC LIMIT 10' % article.replace("_"," ")
1414
results = db.run(query)
1515
nodes = []
1616
rels = []

0 commit comments

Comments
 (0)