AddSearch / search-ui

JavaScript library to develop Search UIs for the web
https://www.addsearch.com/
MIT License
24 stars 4 forks source link

Segmented search does not respect filters or facets. #74

Closed Etroid closed 2 years ago

Etroid commented 2 years ago

When using the segmentedSearch as documented it does not reflect any changes to a filter or facet. Only a keyword change will update the segmented clients. Maybe I am missing something on how to achieve this?

Thank you much.

anttiai commented 2 years ago

Hey. The intended use-case of segmentedSearch is to show several search results lists side by side, with each list having different hardcoded filters. Changeable filters are not properly supported at the moment.

Is your use-case to have changeable filters/facets affecting one of the search result segments, or all of them?

E.g. Filter affecting one of the segments:

E.g. Filter affecting all segments:

Please elaborate your use-case a bit more. Is it one of those above, or something totally different?

Etroid commented 2 years ago

Hey @anttiai

I see. The use case I am dealing with is to have one set of filters/facets affect all search results segments.

The two segmented searches I currently have configured are:

I'd like the user to be able to use the keyword search or apply filters and have the changes reflected in both segments. If a user filters down to "Language" it would filter both articles and videos.

Thanks

anttiai commented 2 years ago

We're looking into this. Shouldn't be too complicated to implement. I'll update you on Monday.

Etroid commented 2 years ago

@anttiai appreciate it! Have a great weekend.

anttiai commented 2 years ago

Hey @Etroid. We'll implement this and will make a release this week. I'll update you when the feature is out.

Etroid commented 2 years ago

Thanks @anttiai much appreciated

anttiai commented 2 years ago

Hi @Etroid. Filtering for segmented search is now implemented in release v0.6.2.

An example of the functionality can be found at https://demo.addsearch.com/search-ui-examples/segmentedsearch/withfilters.html (src here).

Hope this helps and have a great day!

Etroid commented 2 years ago

@anttiai wonderful, I'll give it a whirl tomorrow! Thanks. so much for the speedy resolution.