SynBioDex / SBOLExplorer

MIT License
4 stars 2 forks source link

Sequence search query getting too long #117

Closed cjmyers closed 2 years ago

cjmyers commented 2 years ago

I’m pretty certain that the query is too long. It is URL encoded, since it is being sent as a GET request to the SPARQL endpoint of virtuoso. The filter is created by create_sequence_criteria, line 567 of search.py. You are essentially using virtuoso to check if the user has permission to see the results. This can be done much more simply. If you look at the URI prefixes of all the uris returned by sequence_search, you should only return those that either start with the prefixes in your _from variable (not sure format of that variable, but basically the graphs you have rights too). If distributed search is active, you should also return anything that starts with /public. However, this should only be done with distributed on, since we are sharing this virtuoso with synbioks.org, so results will be a bit odd if you return those entries with distributed search off.

yu-eric commented 2 years ago

Done in dff2ed43da1b02e11b02e41a12f40695ee9bebfa