Open yochannah opened 7 years ago
@yochannah, the search allows to search all categories for all mines (not only genes as it is on android). If we want to allow to search only genes for all mines, we have to have a separate flow for it. The reason to the behavior you are describing is that every mine has its own facets, therefore we can't assume that every facet will be seen with every mine.
@yochannah, some feedback from the testers about this issue: "Search defaults to searching all mines and then the option to 'Refine search' is presented. Might be nice to restrict first to a certain Mine, Organism (missing) and Category/facet initially". Should we let the users to refine search before they perform it? It will solve the problem you described earlier as well.
We decided to test the UX solution:
@yochannah, i am planning on getting search facets from the model, cache them on the client side and update them when model updates
I don't think there's a web service dedicated to providing facets and I was nearly going to tell you it can't be done but I was wrong! just perform a search with no search term and limit to 0 results, like this:
which gives you just the facets and how many results for each type...
Hopefully that helps!
Right. But these categories are the same as we get from the model, aren't they?
I checked with the team - it's not a one-to-one mapping. Some things in the model will not be facets in the search. An example might be BioEntity - a lot of different classes inherit from BioEntity such as Gene and Protein. It's likely people would want to facet by Protein or Gene, but probably not by BioEntity, so there's no bioentity facet.
Ah, ok. So, we just make a search call in the beginning and cache this categories. How often should we refresh this cache then? When model changes?
sounds right to me!
@yochannah, I am having issues with the following queries: http://www.humanmine.org/humanmine/service/search?query=0&size=0&start=0 https://phytozome.jgi.doe.gov/phytomine/service/search?query=0&size=0&start=0 http://zebrafishmine.org/service/search?query=&size=0&start=0 http://bovinegenome.org/bovinemine/service/search?query=0&size=0&start=0 http://hymenopteragenome.org/hymenopteramine/service/search?query=0&size=0&start=0 These requests time out in 120 seconds, i.e. it takes too long to load or they don't return any result at all.
@julie-sullivan these queries are asking for 0 results but I am guessing still trying to count everything in the db first before returning the facets. If we narrow the search term down it only returns the facets relevant to the search (so we wouldn't be able to cache all the search values). Do you have any suggestions on how else to pre-fetch all the facets?
It may be we can't implement the pre-loading search facets feature request.
ok, since this is tricker than we expected, we'll have to implement a new web service in InterMine - see https://github.com/intermine/intermine/issues/1632
Once this is done we can revisit things, but probably it'll need to fall back as follows:
1) use the webservice if it's present (we'll know the correct api version when it's release so it's easy to check for). 2) if no web service, try the 0-size query 3) if that doesn't work, no pre-loaded facets for that mine. Oh well.
Until then let's leave the "buggy" behaviour as is; it's probably more useful to have search on all items than to restrict it to Gene only (the other easy option).
Uh-oh - I think we need to roll part (2) of the above back out of production. I think it's causing InterMines to fail DoS style :( I was going to make a ticket asking why everything was so sluggish when it suddenly dawned on me...
Gos feedback (moved here from separate issue as they are really the same) - The fact that user selects the mine for everything except search is confusing. @yochannah, seems like it is linked with other issues (i.e. request to put refine search before the search itself, etc).
@yochannah can you please comment on @justinccdev's comment https://github.com/intermine/intermine/issues/1632
@julie-sullivan thanks for the reminder, I'd missed Justin's update.
It looks like we probably won't have facets exposed in time before GSoC ends :( let's leave the ticket open as a wishlist feature though.
This is a bug of several parts that I think are related. Let me know if you need me to split it into more than one ticket?
Part A:
Part B: Since I can't filter, I give up and click the back button. It defaults to ThaleMine, presumably because this was the last valid state. I can't remove the filter without going back to the home screen to run the search again.
On a positive note, it looks like the search is updating correctly now - brilliant!