0

I am using the default database server that comes with search api. I have the Hierarchy Index ticked and I also have the taxonomy field that I want selected.

Could someone give me instructions on how to configure the view to have it filtered by the taxonomy parent/show only the children of the selected parent term? I just want a drop down like you would have with a regular view.

(I got this to work in D7 a while ago but I think that was because the field still retained its taxonomy data type when indexed but now with D8 it has none of that.)

  • I can add a field that has a parent relationship but that does nothing.
  • I tried adding a field Vocabulary » Taxonomy term » Term Parents and tried to filter by that but nothing.
0

I just figured this out the answer was simpler than I thought.

I was trying to use contextual filters & relationships like other answers said but what worked was just simply adding the Taxonomy Field to Filter Criteria then selecting the desired parent. That's it. No need to add a relationship to it.

Edit: There is still a problem: it doesn't work when using a grouped exposed filter it gives this error:

A value is required if the label for this item is defined.

Log Message:

PHP - Warning: trim() expects parameter 1 to be string, array given in ...

I tried changing the filter to Combined field filter with the Taxonomy as a field so the input would be string but I still get another error.

PHP - Error: Call to undefined method ...

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.