1

I use content type with a term reference field. I would like users to search by taxonomy terms in that field so I keep the field visible in the main node display. However due to other reasons I would like to hide these terms from the view but keep the content searchable by these terms.

For example I would like to have synonyms searchable I will keep in my term reference field but I don't want users to see all possible variant of the word.

How to hide taxonomy terms from the node display and still have them indexed by Drupal search?

1

I would recommend the Search API. You end up with much more control over the search results, and you have the extra flexibility of using it with views.

You can configure it to also include taxonomy term descriptions in the index which would be an excellent place to store your synonyms/alternate search terms. You could even create a new vocabulary that is never displayed on the node (just set it to hidden in the display tab for the content type), and is limited to only search terms.

  • +1, thanks! I am using Global: Combine fields filter and Search: Search Terms in my views. Will it work with the Search API ? – Refineo May 16 '12 at 7:33
  • You will have some new options in Views, but yes, you should be able to achieve the same output. – Chance G May 16 '12 at 18:48

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.