简体   繁体   English

得到solr中多值字段的计数

[英]to get the count of multi valued field in solr

在solr中,我有一个名为animal的multiValued字段,它的值为{cat,dog},是否可以获取solr中multiValued字段内的值数(在我的示例2中)?

如果要计算多值字段中的项目,请使用CountFieldValuesUpdateProcessorFactory

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. 如果在查询时间内未使用,则始终可以计算列表大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM