2

I have set up search API with facets and a SOLR backend. It all works fine in general, except when I try using with a hierarchical taxonomy.

Each node has a town/city term associated with it. These are represented in the taxonomy as:

-Region 1
--Town1
--Town2
-Region2
--town3

This all displays fine, and works as expected when you click a region: Facets collapsed

But when I click a town, instead of showing just the town nodes, it shows all the nodes in the region - i.e. an OR selection as opposed to AND. So this is still showing all the nodes in all the other towns, not just Tavira.

Facets expanded

And yes, I do have the operator set to OR on the facet display page, so whilst I'm not entirely surprised at this behaviour, setting it to AND completely changes the way the facet is displayed. Plus I would like OR selections to work within the region.

So, I'm wondering how I can achieve the expected behaviour - I've seen it on various sites so I know it's possible. Any ideas how I can do this?

Thanks, Chris

2
  • There is a possible solution here, although I haven't tested it myself yet: drupal.org/node/2211945#comment-8638929 Apr 24 '14 at 12:13
  • The only way I've got this to work is to select all the terms in the hierarchy when saving the node. So in your example, you'd need to select region 1 and town 1 Dec 11 '14 at 13:05

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.