-
Notifications
You must be signed in to change notification settings - Fork 1
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
boolean search #5
Comments
OverviewBased on my understanding this is the structure of tables that we should use for this feature (this is based on rbk-dev. rbk-www has different column and table names): We want to generate a query based on the
Populating Dropdown ValuesThe first thing that the app should do is sending requests to ermrest to get the existing values for each of these columns and show them in a picker:
QueryNow that we know how to get the existing values, I am going to explain the query. An example for one group of these filters would be the following query in ermrest (I wrote it in multiple lines to improve readability):
Based on this, the following is how the request will look like for two sets of filter groups:
Integration With ChaiseNow that we know how to construct the query, we need to pass this query to chaise to show the result. We recently have added custom facet feature to ermrestjs/chaise. You can pass a JSON blob in the {
"displayname": "the query in simpler terms",
"ermerst_path": "a path that ermrest understands"
} This will allow you to pass a var customFacet = {
"displayname": "p{in \"renal vesicle\" TS23..TS23}",
"ermrest_path": "(Developmental_Stage)=(Common:Developmental_Stage:ID)/Order::geq::23&Order::leq::23/$M/(RID)=(Specimen_Expression:Specimen)/Strength=present&Region=EMAPA%3A27678&Pattern=regional&Pattern_Location=proximal/$M"
} This brings the question of how we want to generate the displayname, which I'm not sure about. Regardless, assuming that you have created the object, then you can use the existing window.location = window.origin + "/chaise/recordset/" + ERMrest.createPath("2", "Gene_Expression", "Specimen", null, customFacet) ConcernsURL LengthAs you might have noticed this query is very lengthy and therefore is going to reach the url length limitation eventually. Currently we're setting a limit of 2048 characters for the path in chaise/ermrestjs (because it seems like IE is limiting URL to be 2048 characters. I didn't test this in IE but this is what I found out by searching online). I tested this query in Chrome in rbk-dev and it didn't have any problem with lengthier paths. It seems like the actual url length limit is around 4000 in rbk-dev (mostly set by apache). So if we want to increase that in chaise we can. But anyways this app should check for the url length and limit the number of queries based on that. For each group of queries we're using 164 characters for constants (join and column names). The average length of variables that we're using is around 40 characters. So the total length of the query will be 204 times the number of groups. Which means we can have approximately 10 groups of queries. If we create a view for the PerformanceFor each query we're adding two extra joins. So by adding more and more groups of queries we are making the query more complicated. Testing this was a bit complicated. I had to make sure that the first few groups are not limiting the set of results drastically. For example if the first two groups return empty result, then adding more join wouldn't change the performance at all. The longest query that I could find with different values for Region was this link. It's consistent of 10 group of queries which results in 511 rows. It doesn't seem to have any performance issues. Although we might want to do more testing with a bigger result sets. |
As it is explained in the previous comment, we're doing the But We should fix this by changing our queries to add the extra join and use the "name" instead. So if the query was
It should be changed to
One obvious downside of doing this is adding the extra join. |
Create boolean search UX for GUDMAP.
The app should allow users to keep supplying a group of the following parameters:
There should be an add or delete button that allows users to add a new group or delete an old one.
Once user click submit, it should redirect the recordset page with proper facet parameters..
Take a look at http://legacy.gudmap.org/gudmap/pages/boolean_test.html for the current boolean search that we are trying to mimic.
Take a look at this issue in rbk-project for detail https://github.com/informatics-isi-edu/rbk-project/issues/463
Here is the link to the help page: http://legacy.gudmap.org/Help/Boolean_Syntax_Help.html
The text was updated successfully, but these errors were encountered: