Get score of multi-valued field in solr

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

+7
source share
2 answers

If you want to count elements in a multi-valued field, use CountFieldValuesUpdateProcessorFactory

+4
source

There is no direct way to get the number of elements in a multi-valued field.
You can always support field counting during indexing and use it.

If you are not using during the request, you can always calculate the size of the list.

+1
source

All Articles