inveniosoftware / invenio-app-rdm

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

aggregation filters not "multiple choice" #96

Closed ppanero closed 4 years ago

ppanero commented 4 years ago

When selecting several aggregation values, only the last one applies. I think this is due to the HTTP parameter being called the same and being overwritten when received by the react app?

Screenshot 2020-03-30 at 14 37 39

In the image you can see how two filters are selected, yet only the second one is applied.

fenekku commented 4 years ago

Related to https://github.com/inveniosoftware/invenio-records-resources/issues/73

fenekku commented 4 years ago

React-Search-Kit doesn't send a request with the facets repeated:

When selecting multiple resource types, it will only send the latest chosen one:

/api/records?resource_type=lesson

instead of

/api/records?resource_type=image&resource_type=lesson

I don't know if this is configuration issue or a bug (https://github.com/inveniosoftware/react-searchkit/issues/105) . Reassigning to someone more familiar with react-search-kit to expedite things.

ntarocco commented 4 years ago

This is how Invenio works at the moment. When you have normal filters (not post filters) configured, then you need to repeat the same filter name with different values. The python code will split it. See here. See for example: https://videos.cern.ch/search?page=1&size=21&q=&language=en&language=fr

fenekku commented 4 years ago

@ntarocco Yes, I had seen this part of code from Invenio, but the problem seems to be on the frontend. The react-search-kit app on invenio-app-rdm doesn't send the additional language querystring (per example). Also we are talking about post_filters here... So we probably misconfigured our react-searck-kit app I am thinking... What do we need to fix?

ntarocco commented 4 years ago

I think @zzacharo will have a look, otherwise I need more details (expected vs current behaviors with examples) but if in the URLs you see multiple times the same filter with different values, then RSK is doing the right thing.

Glignos commented 4 years ago

Screenshot 2020-10-13 at 17 46 18 Screenshot 2020-10-13 at 17 46 10 This cannot be reproduced currently.

fenekku commented 4 years ago

This was fixed by https://github.com/inveniosoftware/react-searchkit/commit/db939e9a60e002ac6314a9a387e54e438c0d4804