My project was have 3 content types with taxonomy, i need to combine all the content types term field values and display with hierarchy. My fields are : field_peoples_rits_term, field_publcation_rits_dev, field_research_rits_term I Need combine all these fields as a new field. Thanks in advance
You don't need custom code to achieve this, quoting from here:
There's a wonderful little checkbox in the Search API workflow tab which enables it.
admin/config/search/search_api/index/your solr server/workflow
(You'll need to have created a server to get to this.)
And then tick the box "Index Hierarchy".
In callback options select the taxonomy field where you would like searching for the parent to include the child.