Solr Facet Multiple Words with Comma Separated Values

只愿长相守 提交于 2019-12-01 11:01:55

Tokenizing your field will not solve your facet problem, you will be able to search with a single band name and get results, but the facet will be even worse. The basic rule is to not use any tokenization or text enhance for field used to make facets.

It's good to use a multiValued field, but are actually putting into it a single value with a list of bands, because your query return that list as a single column that is mapped to a single value for the related field in Solr.

You can keep the group_concat output and solve your problem with a simple change to your data-config.xml, telling Solr to split those band names using a separator. Have a look at the RegexTransformer and its splitBy parameter:

splitBy : Used to split a String to obtain multiple values, returns a list of values

If you configure the splitBy with the same separator you're using for group_concat the trick is done, you'll have multiple values and your facet will look good.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!