Solr中CQL3集合图的索引和查询
下列数据来自税务州:Solr中CQL3集合图的索引和查询,solr,cassandra,cql3,datastax-enterprise,datastax,Solr,Cassandra,Cql3,Datastax Enterprise,Datastax,下列数据来自税务州: DSE Search maps collections as follows: Collection list and set: multi-valued field Collection maps: dynamic field The name of the dynamic field minus the wildcard is the map name. For example, a map column name dyna* is mapped t
DSE Search maps collections as follows:
Collection list and set: multi-valued field
Collection maps: dynamic field
The name of the dynamic field minus the wildcard is the map name. For example, a map column name dyna* is mapped to dyna. Inner keys are mapped to the full field name.
最后一句话我不太清楚。字段定义应该是什么样的?假设我在CQL3中将集合映射定义为scores map
,那么以下字段定义是否正确
<field name="scores*" type="int" indexed="true" stored="true"/>
动态字段的名称减去通配符即为映射名称,表示以下动态字段对应于CQL中的以下映射名称: 动态字段:
映射名称:createtablethits(…lang\uuu映射,…)代码>
在您的示例中,动态字段名=分数.*
查询取决于您在字段中插入的值。如果将这些值插入CQL分数列:
{ 'scores_100' : '5000'}
{ 'scores_200' : '10000'}
{ 'scores_100' : '300'}
然后,我认为获得集合中所有分数的查询应该是:
http://:8983/solr/mykeyspace.myscores/select?q=scores\u 100%3A*&wt=xml&indent=true谢谢!相关问题:(但你的回答更具体)啊,是的。对相关问题的出色回答包含了我没有说的一点:动态部分不是通过容器(映射)的名称在映射内部推断出来的。因此,您需要在数据中包含动态部分。这也意味着关键部分必须是文本类型。
{ 'scores_100' : '5000'}
{ 'scores_200' : '10000'}
{ 'scores_100' : '300'}