Open gaurav opened 3 months ago
This would require either a second query (that asks for the number of nodes per model) or a second search method (to retrieve all the models sorted by the number of nodes or something).
The Cypher query we want would be something like:
MATCH (s)-[p]-(o) WITH s, p, o, TYPE(p) AS pred_type UNWIND p.xref AS url WITH url, s, p, o, pred_type RETURN url, COUNT(p) AS numberOfEdges, COLLECT(DISTINCT {s: s, o: o, pred_type: pred_type}) AS edges LIMIT 100;
The other option is that we could pre-calculate the number of edges per model, and then load that into JavaScript.
That would allow us to find the richest models.