1

I use the Facet module version 8.x-1.x-dev. I have a list of taxonomy terms with parents and childs.

The taxonomy term facet is an Entity reference field. I can't get the hierarchical structure working in the frontend.

3

I fixed it by re-added the field from admin/config/search/search-api/index/default_index/fields and take the ID from the index instead of name. Then in the Facet settings use Transform entity ID to label. Then the hierarchical structure from the taxonomy terms works!

1
  • Thanks @meez this helped me today
    – gillarf
    Oct 30 '19 at 16:14
0

I was confronted with the same problem, Meez's comment helped me on my version (Drupal 8.9.9, Search API 1.17.0 and Facets 1.5.0), to have the option Transform entity ID to label on the facet, you must not go through the selection of an ID or Name attribute on the taxonomy field in admin/config/search/search-api/index/MYINDEX/fields, use it directly in the reference field of taxonomy (field_myfield_taxonomyreference). Everything else is fine, thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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