biothings / biothings_explorer

TRAPI service for BioThings Explorer
https://explorer.biothings.io
Apache License 2.0
10 stars 11 forks source link

Make query_results.js use generalize_query_handling #254

Closed ariutta closed 3 years ago

ariutta commented 3 years ago

@marcodarko has been updating the query handling code in this branch: https://github.com/biothings/bte_trapi_query_graph_handler/tree/generalize_query_handling

This code uses a new data structure and needs new method(s) for calling the query_results.js code.

ariutta commented 3 years ago

In a change from the current code, the new generalize_query_handling code calls update just once with all records, so it's now necessary to inspect the records to deduce the query graph.

colleenXu commented 3 years ago

Close since Marco and Anders merged their code.

ariutta commented 3 years ago

FYI: I added some tests for assembling large numbers of records into query results, but I disabled them, because they take a long time: https://github.com/biothings/bte_trapi_query_graph_handler/blob/generalize_query_handling/__test__/integration/QueryResult_2.test.js#L1332-L1711

Here are the approximate times for different numbers of records per edge for a simple query graph n0 -e0-> n1 -e1-> n2:

  1. e0 has 500 records, and e1 has 50k: 40 sec
  2. e0 has 1k records (500 connected, 500 not), and e1 has 100k (50k connected, 50k not): 80 sec
  3. e0 has 1k connected records, and e1 has 100k: 200 sec