to get the count of multi valued field in solr

solr, solrj

Solution

If you want to count the items in a multivalued field use CountFieldValuesUpdateProcessorFactory

Problem

In solr i have a multiValued field called animal and it has the values {cat,dog} is it possible to get the number of values inside the multiValued field in solr(in my example 2)?

Original source