2016-08-16 40 views
7

我使用datastax企業5.0.2,我想使用Solr的無法生成與卡桑德拉datastax Solr模式

我試試這個:

dsetool create_core keyspace.table generateResources = 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. 

而且當我嘗試用寬容真的,我不能讓它工作,要麼是因爲我的主鍵,一個字節的字段名爲「類型」

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個字段這將是很難手動

+0

你得到迴應,如果你使用'infer_solr_schema'? https://docs.datastax.com/en/datastax_enterprise/5.0/datastax_enterprise/tools/dsetool.html#dsetool__inferSolrschema – markc

+0

不,即使在手動映射和/或在寬鬆模式下也不支持字節類型 – Bouki

+0

如果您可以生成重複沒有這種字節類型的虛擬表然後從那裏創建模式,那麼你可以用它來爲原始表。你可能會設置'stored = false'和'indexed = false',並且仍然在模式 – markc

回答

-1

生成它取出

reindix =真。

在第一次創作只是做這樣的:

dsetool create_core keyspace.table generateResources =真

以後你可以重新索引