Issue 10519

Keep facet filters active for subsequent, modified searches

10519
Reporter: mdoering
Assignee: mdoering
Type: Improvement
Summary: Keep facet filters active for subsequent, modified searches
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2011-12-12 13:12:34.726
Updated: 2013-08-29 14:45:47.958
Resolved: 2011-12-19 12:31:31.626
        
Description: I was wondering what is expected to happen when someone does another
search from within the search results page using the form above.

Its strange if you search for birds only and enter another search like "finch" but then get a default search again across all taxa.

Rules to be applied:

a) it should be populated with the previous search?
b) should the current facet filters remain?
c) add reset button to remove all filter facets and add default params
d) a search from the portal home or species home would always be a new search, never keeping any filters.



]]>
    


Author: fmendez@gbif.org
Created: 2011-12-13 00:08:01.303
Updated: 2011-12-13 00:08:01.303
        
a) it should be populated with the previous search?
I don't think this is the expected behaviour, for example a regular google search will always be across all the documents available in the index.
b) should the current facet filters remain?
No, the current facets filters should disappear, there's no guarantee that the new query matches the current filters.
c) add reset button to remove all filter facets and add default params
The remove all filter should remove all the facet filters, even the default facets, could be confusing to the user adding the default facets in "remove all" button.
d) a search from the portal home or species home would always be a new search, never keeping any filters.
Any search should always be a new search.
    


Author: mdoering@gbif.org
Created: 2011-12-13 11:07:37.706
Updated: 2011-12-13 11:07:37.706
        
a) probably a misunderstanding. I meant to show the last search term in the form. Google does the same.
b) that was my main point. I think it should even if the select facet filters don't exist in the new query. It won't harm, would it? Otherwise the search experience is bad if I had to select all the filters again that I just selected before.
c) and that button is only needed if we do b)

    


Author: omeyn@gbif.org
Comment: I'm not sure what more experienced users would expect but personally, I like Markus' suggestion - the original search gets ANDed to the narrowing search and all facets remain as selected, with a reset button.  There would need to be text to make it clear that's what's happening (eg "Search within these results").  I think the bigger question is how often would a user be doing this kind of exploratory, narrowing search vs knowing the terms they're interested in beforehand (I guess kind of curious vs expert user).
Created: 2011-12-13 11:17:51.406
Updated: 2011-12-13 11:17:51.406


Author: ahahn@gbif.org
Created: 2011-12-13 11:29:03.326
Updated: 2011-12-13 11:29:03.326
        
Markus, do you have a typical search pattern / use case in mind where the facets should be maintained, but the search term is changed? Rethinking, I am having trouble coming up with one. For a browser, checking through several search term, I assume that the result overview page will be what they will continue to use for new searches once they arrived there, rather than going back to search entry page each time. In that case, they will not need to maintain the facets.

a) I agree that the search term should display in the "search species" bar. Contrary to the facets, it is not maintained anywhere else.
b) need a use case
c) only needed if the facets are maintained, but if, I would suggest "reset" rather than "remove all", so that the state is the same as when first entering a new search (=GBIF backbone preselected). Removing all would confuse non-expert users, as it suddenly throws in hundreds of checklist datasets
d) agree
    


Author: mdoering@gbif.org
Created: 2011-12-13 11:44:32.207
Updated: 2011-12-13 11:44:32.207
        
My personal confusion resulted from a bird search when hitting the "Aves" link on the species home and then entering "finch".
The aves link shows nicely the largest bird groups, but the next search of course is against the entire corpus and the first hits were virus and plants. I would have expected the bird context to stay when I followed the bird search
    


Author: ahahn@gbif.org
Comment: Possibly this is an issue around handling the "prepared filters" of the entry page (http://staging.gbif.org:8080/portal-web-dynamic/species/?url=species) then, rather than around new searches in the result overview page. I would assume that selection of one of the suggested filters on the entry page will need to seed the facets according to a prepared search pattern. For birds, the "Aves" value of the higher taxon search should be pre-selected on entry into the search result overview. For other prepared searches like fish or trees, this can be quite a bit more complex. 
Created: 2011-12-13 11:51:40.665
Updated: 2011-12-13 11:51:40.665


Author: mdoering@gbif.org
Comment: Maybe there is misunderstanding here, but the predefined search does use a facet filter already and my only concern is to keep those facet filters alive across subsequent searches. I don't think we should include the old query term in the new search - just show it in the form.
Created: 2011-12-13 11:56:35.197
Updated: 2011-12-13 11:56:35.197


Author: ahahn@gbif.org
Comment: That would indeed mean that your "Aves" preset filter on the result summary page should be maintained when you then type "finch" into the search field, though
Created: 2011-12-13 11:57:19.126
Updated: 2011-12-13 11:57:19.126


Author: ahahn@gbif.org
Comment: The misunderstanding is caused by the fact that the facet filter for predefined searches does not display the same way as for newly set filters. On selecting the predefined bird search, the higher taxon facet should display "Aves" as a selected value.
Created: 2011-12-13 12:00:07.484
Updated: 2011-12-13 12:00:07.484


Author: ahahn@gbif.org
Created: 2011-12-13 12:39:20.039
Updated: 2011-12-13 12:39:20.039
        
use example 1:
A user enters through the search entry page and selects "birds" from the preset filters. Implicit expectation: the result summary is now focused on birds, and entering more specific filter criteria is going to limit this set down further.

In this case, the search box would be treated just like another facet.
    


Author: mdoering@gbif.org
Created: 2011-12-13 12:58:53.889
Updated: 2011-12-13 12:58:53.889
        
That the Aves filter does not show up in the selected facets is because its count is too small, so it doesnt rank under the top 25 or so that get shown: http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=&highertaxon=212

That reveals another search issue to tackle. How to show the currently selected facets:
http://dev.gbif.org/issues/browse/POR-155
    


Author: mdoering@gbif.org
Created: 2011-12-13 14:30:37.353
Updated: 2011-12-13 14:30:37.353
        
Can we agree on this proposal then?
 - keep predefined searches as they are using facet filters, but making sure they are shown:
 - show facet filters on top of each facet (see POR-154)
 - keep the facet filters across subsequent searches

For subsequent searches not matching anything facets with filters would still need to be shown.
For example the fake query http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=Abiesko&highertaxon=212

This result would have the checklist and higher taxon facet shown with only the selected filters in them as there are no other values with counts > 0.
    


Author: fmendez@gbif.org
Comment: ok i agree!
Created: 2011-12-13 14:38:24.124
Updated: 2011-12-13 14:38:24.124


Author: ahahn@gbif.org
Created: 2011-12-13 14:39:21.823
Updated: 2011-12-13 14:39:21.823
        
assuming you mean http://dev.gbif.org/issues/browse/POR-155 above

The example fake query makes me wonder whether we are still talking cross-purposes, though. In my opinion, the "selected filters" section should disappear consistently everywhere, only the facet filters showing. Otherwise agree; plus adding the already discussed "reset" option
    


Author: ahahn@gbif.org
Comment: ups, sorry - was misreading you. Fine with me!
Created: 2011-12-13 14:42:22.248
Updated: 2011-12-13 14:42:22.248


Author: fmendez@gbif.org
Comment: I think that the three observations are implemented now, please validate the functionality, once i get positive feedback I'll close the issue.
Created: 2011-12-14 19:15:31.006
Updated: 2011-12-14 19:15:31.006


Author: mdoering@gbif.org
Created: 2011-12-14 20:00:22.448
Updated: 2011-12-14 20:00:22.448
        
Id try to run a reptiles search and get an error:
http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=&highertaxon=358
    


Author: fmendez@gbif.org
Comment: fixed, don't know why we are getting null for count names
Created: 2011-12-14 20:35:54.959
Updated: 2011-12-14 20:35:54.959


Author: fmendez@gbif.org
Created: 2011-12-14 20:44:27.763
Updated: 2011-12-14 20:48:38.721
        
markus if you test the highetaxa facet directly in Solr: http://jawa.gbif.org:8080/solr/select/?q=checklist_key:d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&version=2.2&start=0&rows=10&indent=on&facet=true&facet.field=higher_taxon_nub_key
we have the facet 358 but don't know whay is not in the list
    


Author: fmendez@gbif.org
Comment: now is working, removed the limit for the facets, paging in facets can be confusing when using predefined filters, by the moment  the paging parameters for facets were removed
Created: 2011-12-14 21:20:16.474
Updated: 2011-12-14 21:20:16.474


Author: mdoering@gbif.org
Created: 2011-12-15 13:51:16.703
Updated: 2011-12-15 13:51:16.703
        
Looks good!
Im getting a NPE for this subsequent snake / reptiles search though:
http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=snakes&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&highertaxon=358&extinct=true

Similar query with results works:
http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=lizard&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&highertaxon=358&extinct=true
    


Author: ahahn@gbif.org
Created: 2011-12-15 16:37:51.201
Updated: 2011-12-15 16:37:51.201
        
Getting very close!
One thing I tried:: set a few filters to a "Insecta" search
http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=geometridae&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&highertaxon=216&highertaxon=6950&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&initDefault=false&rank=genus

- then type "mallomonas" into the search field at the top
This gets 0 results, which is expected because Mallomonas does not belong to Insecta. However, the set facets all disappear, so I cannot remove them
 (http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=mallomonas&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&rank=genus&highertaxon=216&highertaxon=6950).

I assume they should display, so that the result is more understandable and can be corrected.
    


Author: ahahn@gbif.org
Created: 2011-12-15 16:57:41.528
Updated: 2011-12-15 16:57:41.528
        
Another thing:
- search entry page: type "Mallomonas"
- search result page: select Higher Taxon facet value "Synuraceae" (wait for page to return)
- search result page: remove "Mallomonas" from search field

--> result list is plausible, but Higher Taxon resets to non-related higher taxa, "Synuraceae" no longer visible
    


Author: fmendez@gbif.org
Created: 2011-12-16 06:49:05.912
Updated: 2011-12-16 06:49:05.912
        
now everything is working better, previous selected facets are shown, if the facet is not part of the returned facets it's displayed with a count of 0.

Please validate if we still need a "remove all facets" button.
    


Author: ahahn@gbif.org
Created: 2011-12-16 09:42:46.597
Updated: 2011-12-16 09:42:46.597
        
Perfect. Verified that the two scenarios above behave much better now.

Suggestion:
- no "remove all facets" button
- keep the "reset" functionality (same defaults as when entering through the search entry page)
- convert the "reset" layout into something in line with the general layout; link instead of button, similar to "see all" links, or white button similar to page navigation. May need to defer the layout question to Vizzuality