【发布时间】:2016-12-23 07:47:08
【问题描述】:
我正在使用 datastax enterprise 5.0.2,我想使用 solr
我试试这个:
dsetool create_core keyspace.table generateResources=true reindex=true
但我明白了:
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Type org.apache.cassandra.db.marshal.ByteType is not supported with automatic Solr schema generation.
Specify 'lenient: true' in your resource generation options to ignore unsupported columns.
当我尝试使用 lenient true 时,我也无法让它工作,因为我的主键有一个名为“type”的字节字段
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Schema Parsing Failed: Schema contains no indexed field for element 'type' of composite key '(lang,type)
任何线索如何解决这个问题?
我的表格有超过 100 个字段,手动生成会很困难
【问题讨论】:
-
如果你使用
infer_solr_schema,你会得到回应吗? docs.datastax.com/en/datastax_enterprise/5.0/… -
不,即使手动映射和/或在宽松模式下也不支持字节类型
-
如果您可以在没有此字节类型的情况下生成重复的虚拟表,则从中创建架构,然后您可以将其用于原始表。您也许可以设置
stored=false和indexed=false并仍然在架构中拥有它 -
已经尝试过了,但也不起作用。我最终使用了 int,不是最好的解决方案,而是一个可行的解决方案
标签: solr datastax datastax-enterprise cassandra-3.0