0

I have an index for a content type that has a taxonomy field attached.

I have a fulltext search up and running using the index, but would like to be able to filter the results additionally using tags.

If I add the taxonomy field to the index, it is added as an integer value, and the ID of the tag assigned is being indexed in Solr.

If, however, I try to add the field as a filter in my View, I get an error that there is no handler available.

What is the correct way to implement filtering by taxonomy term?

2
  • Exposing it as a facet is one way. – Kevin Aug 24 '17 at 13:31
  • You mean using Facets? – Tim Aug 24 '17 at 14:40
0

IMHO the best way is to add the taxonomy's name to the index. This may not be shown as an option in D7 if you have not asked for the fields to be extended to the referenced entities.

Note: expanding the field list in D7 can make the field list take Minutes to load and you may get a few script running long warnings. Be patient and let the script keep running. The list will come up eventually.

Once you have the text in the index, you can use this in either the search view filter or use it in a facet.

An alternative would be to add a relationship between your term id search field to the actual term data. Then you should have the term name available for use.

Note that this method will add a lot more overhead to your search than just having the term names in the index.

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.