How do I see SOLR dynamic fields in CQL with Cassandra?

北慕城南 提交于 2019-12-01 22:59:55

Through CQL3 Dynamic fields should work as well with a few caveats.

  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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!