Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify the frontend to sort models by descending number of nodes #134

Open
gaurav opened this issue Mar 12, 2024 · 2 comments
Open

Modify the frontend to sort models by descending number of nodes #134

gaurav opened this issue Mar 12, 2024 · 2 comments

Comments

@gaurav
Copy link
Member

gaurav commented Mar 12, 2024

That would allow us to find the richest models.

@gaurav gaurav added this to the CAM KP May 2024 milestone May 20, 2024
@gaurav
Copy link
Member Author

gaurav commented May 20, 2024

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;

@gaurav
Copy link
Member Author

gaurav commented May 20, 2024

The other option is that we could pre-calculate the number of edges per model, and then load that into JavaScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant