Datastax DSE 5.1搜索是否支持facet.pivot中使用的Solr局部参数 [英] Does Datastax DSE 5.1 search support Solr local paramater as used in facet.pivot

查看:86
本文介绍了Datastax DSE 5.1搜索是否支持facet.pivot中使用的Solr局部参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解DSE 5.1运行Solr 6.0版本。
我正在尝试通过Solr本地参数使用facet.pivot功能,但似乎无法正常工作。



我的数据如下
简单的4个字段



我需要按名称字段对结果进行分组,以便获得每年的总和(金额)。我相信带有局部参数的facet.pivot可以解决但不能与DSE 5.1一起使用。



来自:Solr文档
将Stats组件与枢轴
结合使用除了其他类型的构面支持的某些常规局部参数外,stats局部参数还可与facet.pivot一起使用,以引用您希望针对每个数据透视约束计算的stats.field实例。 / p>

这是我要使用的。
stats = true& stats.field = {!tag = piv1} Money& facet = true& facet.pivot = {!stats = piv1} name

解决方案

如果您尝试从CQL中的solr_query执行这些查询,则不支持stats组件。我们将分面设置为简单参数,因为目的是在solr_query中提供更多GROUP BY Type功能,而不是分析功能。



借助DSE 5.1(Solr 6.0.1),以及对使用Solr进行分析的渴望,请使用Solr提供的HTTP JSON Facet API。它取代了stats组件,并以更强大的方式提供您正在寻找的东西。


I understand that DSE 5.1 runs Solr 6.0 version. I am trying to use facet.pivot feature using Solr local paramater, but it does not seem to be working.

My data is as follows Simple 4 fields

What I need is to group the result by name field so as to get sum(money) for each Year. I believe facet.pivot with local parameter can solve but not working with DSE 5.1.

From:Solr documentation Combining Stats Component With Pivots In addition to some of the general local parameters supported by other types of faceting, a stats local parameters can be used with facet.pivot to refer to stats.field instances (by tag) that you would like to have computed for each Pivot Constraint.

Here is what I want to use. stats=true&stats.field={!tag=piv1}money&facet=true&facet.pivot={!stats=piv1}name

解决方案

If you're trying to execute these queries from solr_query within CQL, the stats component is not supported. We keep the faceting to simple parameters as the purpose is to provide more GROUP By type functionality in solr_query, not analytics.

With DSE 5.1 (Solr 6.0.1), and the desire for analytics with Solr, use the HTTP's JSON Facet API from Solr. It has replaced the stats component and provides what you are looking for in a more robust fashion.

这篇关于Datastax DSE 5.1搜索是否支持facet.pivot中使用的Solr局部参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆