search-ui icon indicating copy to clipboard operation
search-ui copied to clipboard

Segmented search does not respect filters or facets.

Open Etroid opened this issue 4 years ago • 8 comments

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.

Etroid avatar Feb 01 '22 23:02 Etroid

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:

  • Segment: Products
  • Segment: Support content
  • Filter: Product color (updates only Products segment)

E.g. Filter affecting all segments:

  • Segment: Products
  • Segment: Support content
  • Filter: Language (updates both Products and Support content segments)

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

anttiai avatar Feb 02 '22 10:02 anttiai

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:

  • One pre-filtered to "articles"
  • A second pre-filtered to "videos"

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

Etroid avatar Feb 02 '22 16:02 Etroid

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

anttiai avatar Feb 04 '22 13:02 anttiai

@anttiai appreciate it! Have a great weekend.

Etroid avatar Feb 04 '22 19:02 Etroid

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

anttiai avatar Feb 07 '22 14:02 anttiai

Thanks @anttiai much appreciated

Etroid avatar Feb 07 '22 16:02 Etroid

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!

anttiai avatar Feb 09 '22 11:02 anttiai

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

Etroid avatar Feb 09 '22 20:02 Etroid