如何使用Cassandra查看CQL中的SOLR动态字段? [英] How do I see SOLR dynamic fields in CQL with Cassandra?

查看:193
本文介绍了如何使用Cassandra查看CQL中的SOLR动态字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Solr动态字段在Solr中显示为可搜索,在Thrift界面中可用,但在使用CQL时,字段不会显示。是否有特定的搜索风格或查询风格,可用于揭示动态字段及其值?

Solr dynamic fields appear as searchable in Solr and available in the Thrift interface, but when using CQL, the fields don't appear. Is there a specific search style or querying style that can be used to expose what the dynamic fields are and their values?

推荐答案


  1. 您需要将类型声明为地图(例如:dyn_map)

  2. 动态部分不会在地图中以名称推断出来。
  3. 容器(地图)。所以你需要在数据中包括动态部分。这也意味着关键部分必须是文本类型。
  1. You need to declare the type as a map (eg: dyn_ map) and create the CQL schema.
  2. Post your schema with the dynamic type declared.
  3. The dynamic part isn't inferred inside the map by the name of the container (the map). So you need to include the dynamic part in the data. This also means that the key part has to be a text type.

因此,在上面的示例中,您将看到一个如下所示的地图:

So in the above example you'll have a map that looks like this:

'dyn_' : {dyn_1 : 1, dyn_2 : 2, dyn_3 : 3}

在未来,我们在谈论删除对文本类型的限制,允许其他类型,但现在这是它如何工作索引。

In the future we're talking about removing the limitation on the text type and allowing other types, but right now this is how it works for indexing.

我们还使用特殊字段存储动态字段名称,此查询:

We also use the special field to store dynamic field names, this query:

'_dynFld:dyn_1'

应返回上述示例中的一个结果。

Should return one result from the above example.

这篇关于如何使用Cassandra查看CQL中的SOLR动态字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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