CDRH / orchid

Rails Engine for site integration with CDRH API
MIT License
3 stars 0 forks source link

selecting on multiple facets #245

Open wkdewey opened 2 years ago

wkdewey commented 2 years ago

Do we need to implement this functionality, and is it possible in our current setup? This came up as one of the possible changes to include for Habeas.

wkdewey commented 2 years ago

This is already present in Orchid. The interface needs to be improved to allow for easier selection of multiple facets, in situations where the list is too long to display all at once.

wkdewey commented 2 years ago

@karindalziel and @techgique suggested that we should use the "see more" page to deal with facets. Currently, this is the browse_facet page for each facet. It is not designed for facet selection, it just has search links, and also it is intended for browsing and not just an addendum to the facets on the main search page. Do we want to replace this page, or else add a separate page (which would require a new controller action, routes, etc.)

wkdewey commented 2 years ago

Assuming that we're using the existing browse_facet page--currently it just links back to the search page with the one facet you chose selected. In a way, this is not much different from what happens when you click on a facet on the search page (it makes an elasticsearch query, and this is how it knows how to narrow the facets down, and from there you can further filter the search, again by making elasticsearch queries). If we want to implement multiple selection within browse_facet, I can see two ways to do it.

  1. make elasticsearch queries to narrow down the selection. I'm not sure at the moment how to do it, and the page is not set up to take search parameters, but there is probably a way
  2. allow users to select as many checkboxes as they like, and construct an elasticsearch query (to the search page) that way
wkdewey commented 2 years ago

In the Blacklight example, it just takes you back to the original page, with that facet selected. For example https://demo.projectblacklight.org/?f%5Blanguage_ssim%5D%5B%5D=Sindhi

wkdewey commented 2 years ago

I went with option 1 above

wkdewey commented 2 years ago

Also needs to be changed to pass through parameters that are already selected