to get the count of multi valued field in solr

梦想的初衷 提交于 2019-12-08 19:11:40

问题


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)?


回答1:


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




回答2:


There is no direct way to get the count of items in a multivalued field.
You can always maintain the field count during indexing and use it.

If not using during query time, you can always count the list size.



来源:https://stackoverflow.com/questions/13838235/to-get-the-count-of-multi-valued-field-in-solr

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