Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获取Solr中多值字段中所有不同值的列表_Solr_Solarium - Fatal编程技术网

获取Solr中多值字段中所有不同值的列表

获取Solr中多值字段中所有不同值的列表,solr,solarium,Solr,Solarium,我在Solr中有从postgres数据库导入的数据。文档看起来像这样(非常简化): 我想获得strings\u ss "abc","bcd","efg","hig","aaa" 对于单个值字段,我使用分组。但是,对于多值字段,该操作失败,错误为:不能在多值字段上使用FieldCache: 从Solr获取此列表的最佳方法是什么?您可以使用Solr方面查询来获取字段的唯一值。它将为您提供字段和频率的唯一值(没有文档具有该唯一值)。有关更多信息,请查看以下链接 可以使用solr方面查询来获取字段

我在Solr中有从postgres数据库导入的数据。文档看起来像这样(非常简化):

我想获得
strings\u ss

"abc","bcd","efg","hig","aaa"
对于单个值字段,我使用分组。但是,对于多值字段,该操作失败,错误为:
不能在多值字段上使用FieldCache:


从Solr获取此列表的最佳方法是什么?

您可以使用Solr方面查询来获取字段的唯一值。它将为您提供字段和频率的唯一值(没有文档具有该唯一值)。有关更多信息,请查看以下链接


  • 可以使用solr方面查询来获取字段的唯一值。它将为您提供字段和频率的唯一值(没有文档具有该唯一值)。有关更多信息,请查看以下链接

  • 试试这个

    http://localhost:8983/solr/core/select?q=*&facet=true&facet.field=strings_ss
    
    试试这个

    http://localhost:8983/solr/core/select?q=*&facet=true&facet.field=strings_ss
    

    除镶嵌面之外的另一个选项是使用如下所示的:

    http://localhost:8983/solr/core/admin/luke?wt=json&fl=strings_ss&numTerms=....
    

    阅读
    topTerms
    property

    除刻面外,另一个选项是使用如下内容:

    http://localhost:8983/solr/core/admin/luke?wt=json&fl=strings_ss&numTerms=....
    
    并读取
    topTerms
    属性