【问题标题】:unable to generate solr schema with cassandra datastax无法使用 cassandra datastax 生成 solr 架构
【发布时间】: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=falseindexed=false 并仍然在架构中拥有它
  • 已经尝试过了,但也不起作用。我最终使用了 int,不是最好的解决方案,而是一个可行的解决方案

标签: solr datastax datastax-enterprise cassandra-3.0


【解决方案1】:

取出

reindix=true。

在第一次创建时,只需这样做:

dsetool create_core keyspace.table generateResources=true

稍后你可以重新索引

【讨论】:

    猜你喜欢
    • 2016-12-11
    • 2017-12-26
    • 1970-01-01
    • 1970-01-01
    • 2016-11-23
    • 2017-11-30
    • 2014-12-10
    • 2015-03-15
    • 2018-06-01
    相关资源
    最近更新 更多