Talking Drupal #122 - Taxonomy or Entity Reference

June 15, 2016

In episode #122 we talk about using Taxonomy or Entity References

Listen: 

00:00
 

Watch: 

Topics: 

  • Definition of Taxonomy
  • Scenario/Use cases
  • Considerations 

Modules: 

Module of the Week: 

IMCE Mkdir

IMCE Mkdir allows users to create and delete sub-directories under directories assigned by IMCE.

Sponsors

Comments

That was a great topic. When D7 came along and taxonomy terms became field-able I think folks said "oh we can use terms just like nodes". That was a bad idea. I have worked on sites where myself or others decided to use terms like nodes and it causes problems. Here is one I ran into recently: I wanted to do a full text site search using Search API (and Search API Database Search, not Solr). One of the content types needed in the search results was a term. You cannot mix nodes and terms in the same Search API index. There is a module that allows you to mix them, but only if using Solr, and you lose functionality like autocomplete. So I had to custom code the search. I agree with the general idea that terms should only be used if you must have hierarchy or the vocabulary is simple like color: red, blue, green. And if a piece of content is to be viewed on it's own, it should be a node, not a term. If the hierarchy thing could be done with nodes, I would go so far as to consider never using terms. But, no reason not to use terms so long as it is just a category not actual content.

Rick - great example of getting into trouble with terms.   I like your rule "if a piece of content is to be viewed on it's own, it should be a node, not a term."

-S

I believe you can add a taxonomy term to a database search api search. Only if it's a term on the node though. If you mean index the terms and index some content then that likely is not possible without custom code like you mentioned.

Hi Nic,
Yep, this is what I meant "If you mean index the terms and index some content".
Thanks,
Rick

Add new comment