I have two entities: Entity Product and Entity Product Category. Entity Product has an entity reference field on the Entity Product Category.
Display categories and their number on the right by facets.
What I did:
- I created the Product Category view mode and selected it in Entity Product, where I disabled all the fields because I don’t need to display them, because I will display the facets:
- Added the necessary fields to the previously created index and once again indexed the Entity Product:
- Created view Categories results facets which will be used as Facet source. And in Show:Rendered entity | Settings in settings selected view mode Product Category:
- Added a facet:
- I chose Categories results facets view as Facet source:
- Configured the facets:
- Added the Categories results facets block to the Block layout:
But the facets are not displayed on any page.