RE: RE: Federated Search Key is missing for Category Facet

thumbnail
Olaf Kock, modified 2 Years ago. New Member Posts: 3 Join Date: 8/3/23 Recent Posts

While trying to display specific categories using the Category Facet I noticed there's no 'Federated Search Key'.
​​​​​​​Is this a bug? Most of the other search related widgets do have such a setting.

I checked CE U69 and U88 and they both have the same flaw.

thumbnail
Russell Bohl, modified 2 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

Hi Jan, the federated search key can be used for searching any Elasticsearch index. Since the ootb facet widgets rely on knowing the mapping, specifically which field to aggregate results by, I don't think it would make sense to use these when searching an index other than the company index for Liferay (the default). The mapping isn't known for any other index, so these ootb facets aren't likely to work properly. I think this configuration is missing from all the facet widgets except for the Custom Facet, where you can configure the field to aggregate by. So if you're using the federated search key, maybe you can get by with adding a bunch of custom facets to the page?

thumbnail
Jamie Sammons, modified 2 Years ago. New Member Posts: 3 Join Date: 8/3/23 Recent Posts

In fact it does makes sense a lot. With the federated search keys you can have multiple search results on one page even while making use of the Liferay search indices. And if this widget doesn't have this key it won't bind to any of the search results widgets that are using the federated search keys. The custom facet is a work-around for now but I would strongly suggest to add the federated search key also to the category facet widget (and maybe others). As the admin/end-user I'm well aware that I can only apply this when using the Liferay indices.

thumbnail
Russell Bohl, modified 2 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

Something tells me your use case isn't one I've considered, but I'm interested in what it might look like.

Liferay's search infrastructure team knows that the current capabilities around federated search aren't providing a complete federated search experience. I think understanding what a real use case like yours is trying to accomplish would help the team, if you're willing to go into a little bit of detail on what your setup looks like and what you're trying to accomplish.

thumbnail
Jamie Sammons, modified 2 Years ago. New Member Posts: 3 Join Date: 8/3/23 Recent Posts

In our case we are showing events on the homepage based on searchresults. We have two searchresults widgets both with their own federated search key, 'current' and 'upcoming'. Depending on your location we show these events. So e.g. you live in the Netherlands you get different results for both compared to when you live in Germany. Based on filters and perhaps custom facets we can achieve this. But since we are using a Vocabulary for countries I hoped the Category facet widget would support the federated search key as well since this would allow to show/filter based on Categories and the fact that you can select a specific Vocabulary by configuration. Maybe noone has every thought of this use case but it is actually quite interesting to use search to dynamically select assets and have more then one search result on the page.

thumbnail
Russell Bohl, modified 2 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

That is an interesting use case--dynamic asset display using the search widgets. Am I right in thinking that, to allow a user to select the country, they'd be clicking on a category in the category facet widget? In that case, you would want the single facet selection to affect both search results widgets, right?

I suppose you've explored the more traditional asset display routes Liferay has before trying this with search widgets?

I don't know if you're a DXP customer, but as of a recent update, Search Blueprints are now automatically made into Collection Providers: documentation, blog