0

I have vocabulary ("Subtype") hierarchy like this...

  • CP
    • LP
      • ML
      • U
    • BL
      • FL
      • AD
    • MA
  • PD
    • OPD
    • SG

I have a field on my entity type field_subtype. What I'd like is to configure my search api and facet to when, for example, on the homepage, only show

  • CP
  • PD

If a user clicks through to CP, only show

  • LP
  • BL
  • MA

And so on.

I have gone through a mess of configuration trying to get this to work, ending up with results that will either show level 1 (CP, PD) or level 3. I think this is because no content is directly tagged with items such as LP, BL, MA but I can't be certain.

For the search API side of things, I've added the subtype field, tried drilling into it to add the tid only, etc. Then within the facet settings I've tried choosing the different fields to see the results, but I'm never getting what I expect.

I feel like this is something that should just work and that I'm goofing it up somewhere. How do I configure my search api fields and facet settings to work in this way?

EDIT It might just be as simple as missing the Index Hierarchy in the processor tab. I'll post as an answer if/when I confirm. I checked this several times but, somehow, I apparently missed the Subtype (other fields are configured).

enter image description here

Your Answer

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

Browse other questions tagged or ask your own question.