DSpace / dspace-angular

DSpace User Interface built on Angular.io
https://wiki.lyrasis.org/display/DSDOC8x/
BSD 3-Clause "New" or "Revised" License
135 stars 436 forks source link

Enhance hierarchical search filters (for controlled vocabs) to support item counts, etc. #1932

Open tdonohue opened 2 years ago

tdonohue commented 2 years ago

Is your feature request related to a problem? Please describe. The initial implementation of hierarchical filters/facets for controlled vocabularies doesn't display matching item counts (like normal facet). See screenshots in https://github.com/DSpace/dspace-angular/issues/815#issuecomment-1293270195

Currently, this means it acts more like a search filter instead of a facet. It can be used to help you filter a search to a given controlled vocabulary value. However, the user has no indication of whether the filtered controlled vocabulary value will contain any results... they have to select the value to see what comes back.

Additionally, the hierarchical list does not take into account the current search term(s). For example, if you search on "Computer Science" and then open up the hierarchical vocabulary, you will still see the full vocabulary instead of a filtered list of terms which can be matched with "Computer Science".

Describe the solution you'd like If possible, we'd prefer a user experience which is more similar to other facets. If you open up the hierarchical list of vocabulary terms, ideally you'd see an indication of how many results will be returned for each term (similar to label displaying the matches count which appears next to every other facet). Additionally, if a specific term will not return results, it should not be listed (similar to how facet values are not listed if they return zero results.

The exact design will require more analysis, including wireframes. Initial (rough) estimates were provided by 4Science as likely being about 64-80 hours for the UI, and about 48 hours for the backend. However, these estimates are highly dependent on agreement on the feature design.

Describe alternatives or workarounds you've considered Currently, our workaround was to simplify the implementation as shown in the screenshots at https://github.com/DSpace/dspace-angular/issues/815#issuecomment-1293270195 This provides a very simple way to filter using a controlled vocabulary, but it's not as user friendly as the approach described here.

Additional context This ticket was created based on discussions in https://github.com/DSpace/dspace-angular/issues/815.

kshepherd commented 3 months ago

Some additional notes regarding the current implementation as at 8.0:

  1. As @tdonohue notes, the filter autosuggest shows the raw values rather than the friendly 'child node' label - this should not be difficult to match the sidebar facet value display, right?
  2. The browse tree works nicely when selecting an exact node that is stored in item metadata, but users should reasonably expect to be able to choose a parent node in the tree, and have that filter search for items with the child subject facets for the selected node as well. I believe simply changing the operator from equals to contains would be sufficient for this (better yet would be 'startswith' but it isn't an operator we have available) in most cases
  3. (I think the same argument could be made for the other ::-split facet values shown in the sidebar, but since we've lost context by this time we don't know what is a parent and what isn't... not sure if contains is quite as safe as an operator there)
  4. When I have subjects from the child nodes applied (e.g. Numerical analysis, Mathematical statistics) the only facet values I see in the sidebar are from the middle node "Applied mathematics", just as if I had added "Applied mathematics" itself (selecting it doesn't show its own parent, it seems to just always be biasing for the 2nd or middle node?) Is this intentional? In other words, I never see MATHEMATICS or Numerical analysis in the sidebar facets as I'd expect.