Solr search api indexing referenced fields by their id not value

by Aca85   Last Updated December 06, 2018 13:07 PM

So i created a basic Solr core and index. In the index i added several diff. content types and added a lot of fields from those CT, including a aggregated field (union of several diff. fields: plain text, entity ref. fields, etc) Now i built a view based on that index (displaying rendered entities), and in the filter added a Fulltext search which will search on the Aggregated field.

For the most part it all works as designed, except that the fields which are entity reference fields (taxonomies) are indexed by their reference id (tid) and not the human readable value. E.g.: if a term (Math) from the vocabulary Subjects is indexed, the value which will be stored by solr is 5 (which is the term id), so when you use the fulltext search field and search Math there will be no results, but if you search 5, the content type where Math is selected will be displayed, not the best UI if you agreee.

Is there any way to search by the human readable values, without me altering the query and then finding the corresponding tid of the value entered in the search and then passing it back to the query, because that kinda defeats the purpose of having a backend search engine.

Thanks, Will

Related Questions

Updated March 10, 2017 14:07 PM

Updated June 01, 2015 18:03 PM

Updated June 13, 2015 16:03 PM