2

Taxonomy terms are configured as such:

Parent category 1
- Child category 1
- Child category 2

Parent category 2
- Child category 3
- Child category 4

"Empty facet behaviour" is set to "Do not display facet".

"Flatten hierarchy" is turned off.

"Treat parent items as individual facet items" is turned off.

But the facet display doesn't show the parent items. How do I configure it properly to do so?

enter image description here enter image description here

  • 1
    Are the nodes assigned to parent and child taxonomy terms or just child? If the items are only assigned to child taxonomy terms then Empty facet behaviour might hide the parent taxonomy terms as it doesn't have any nodes assigned to it. Everything else looks fine to me. – Ash U Mar 7 '17 at 5:19
  • I've assigned some test nodes to the parent terms. – Pim Mar 8 '17 at 15:26
  • Are you using Search API or Apache Solr as the search module. Both use Facet API for facets. – jowan sebastian Mar 29 '18 at 15:48
0

Enable the "Index hierarchy" option under your index filters. After enabling you can choose the field(s) for which you want to index the hierarchy. Save. Re-index.

Parent terms will now show in your facet.

  • The only works if using Search API with facets, Apache Solr module doesn't have that feature. – jowan sebastian Mar 29 '18 at 15:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.