inveniosoftware / invenio-app-rdm

Turn-key research data management platform.
https://inveniordm.docs.cern.ch
MIT License
96 stars 140 forks source link

Search Facets Not Dynamic #2672

Open yoganandaness opened 2 months ago

yoganandaness commented 2 months ago

Is your feature request related to a problem? Please describe.

The problem is that, in the InvenioRDM App, the search results are not dynamic – when a facet is selected, the other facets do not adjust to the new result.

Example: This could be a problem in an e-commerce website's product search feature. For example, imagine a user is searching for laptops. The user first selects the brand "Apple" as a facet. Ideally, other facets such as "RAM size," "Storage capacity," and "Color" should update to reflect only the options available for Apple laptops. However, if the search results are not dynamic, these other facets will still show options for all laptop brands, not just Apple. This can lead to a frustrating user experience, as the user might select a RAM size or color that is not available for Apple laptops, resulting in no search results or invalid product combinations. This lack of dynamic adjustment makes it harder for users to filter products efficiently and accurately.

Describe the solution you'd like

In the Opensearch Aggregation result, instead of aggregating against the total records, aggregate only against the Search Resultset.

Describe alternatives you've considered

None

Additional context

None

Screenshot 2024-05-02 at 09 58 28

fenekku commented 2 months ago

Thanks for taking the time to provide your feedback. This has a long history and a fair amount of debate. The end-result for now: this is a feature and not a bug. We deliberately do it this way.

I think the 2 main reasons are:

Personally, I think using filter pills might be the solution: https://github.com/inveniosoftware/invenio-app-rdm/issues/2564 . That is what e-commerce site like Amazon use. But also this is Amazon, we don't have the resources of Amazon :smile: .

yoganandaness commented 2 months ago

Thank you so much for the reply.

Can you suggest me some, if there is a way i can take it forward and customize it by myself, by the way i want. ?

fenekku commented 2 months ago

I don't know if it is customizable without a fork. Some starting points:

Couldn't find the union part of the inner facets in the backend, so that's also to find.

That's the extent of what I can comment on. Maybe @zzacharo or @ntarocco are more familiar overall.

github-actions[bot] commented 6 days ago

This issue was automatically marked as stale.