3

我有更多类似的查询solr,我想根据特殊字段对结果进行分组。我在solr.

我设置:

group = true & group.field = field 1 & group.limit = 3

我有这个查询

但正如我看到的那样,不支持组。我使用 solr 5.3.1

问题

  • 我如何对solr结果进行分组?
  • 为什么solr不支持组?
4

1 回答 1

-1

Use the CollapsingQParser as documented here: https://cwiki.apache.org/confluence/display/solr/Collapse+and+Expand+Results

For instance, if you want to group for field1 and limit 3 as you mentioned:

fq={!collapse field=fiedl1 max=3}
于 2017-06-12T13:36:31.410 回答