should help you out Text fields are not suggested to be used for Faceting. You won't get the desired behavior as the text fields would be tokenized and filtered leading to the generation of multiple tokens which you see from the facets returned as response. SolrFacetingOverview :-
it fixes the issue Which of the multiple of values would you like to sort multiValued field on? Solr can't decide for you. The usual answer is to create a second field just for sort, it does not need to be stored. Then, you use Update Request Processor to populate that second field from the first and you only keep one value which will be used for sort.
solr facet with text field, how to stop solr tokenize it into separate tokens, I want to get the whole field result
I wish this helpful for you I have a text field type named buyer, I need facet on the field. And get the whole value, nor separate tokens, how can I do? thanks a lot. eg, buyer field value are "beauty inc"、"markwins llc"、"products inc", this is facet result:
like below fixes the issue The field MerchantName used for faceting. This field should be defined in schema.xml as a string (type="string") in order for the facet to use the whole text. As you are using a text based field with field type as text_general, the value will be split into multiple tokens. The same is the case with MerchantName field.