DSE 架构创建:节点工作负载不兼容
DSE Schema Creation: node workload is not compatible
我目前正在尝试为特定节点创建图形模式以对其进行查询。我试图按照显示的示例 here 进行操作,但遇到了标题中所述的错误。
属性 创建密钥
schema.propertyKey('id').Text().ifNotExists().create()
schema.propertyKey('name').Text().ifNotExists().create()
schema.propertyKey('age').Int().ifNotExists().create()
schema.propertyKey('location').Point().withGeoBounds().ifNotExists().create()
schema.propertyKey('gender').Text().ifNotExists().create()
schema.propertyKey('dob').Timestamp().ifNotExists().create()
使用的架构是
schema.vertexLabel("people_node").index("search").by("name").asText().by("gender").by("location").by("dob").ifNotExists().add()
schema.vertexLabel("people_node").index("people_node_index").materialized().by("id").ifNotExists().add()
schema.vertexLabel("people_node").index("people_node_index")secondary().by("age").ifNotExists().add()
示例数据
id, name , age, location , gender , dob
0, Betsy, 15 , POINT(10 15) , F , 1997-09-21T12:55:54+0400
遇到错误
java.lang.IllegalArgumentException: Cannot create search index, node workdload is not compatible
任何解决此问题的建议将不胜感激。
您需要在启用 DSE 搜索的情况下启动 DSE。根据安装方法,它可能是:
- 对于 tarball 安装 - 将
-s
标志传递给 dse cassandra
命令
- 用于软件包安装 - 在
/etc/default/dse
文件中设置 SOLR_ENABLED=1
并重新启动服务
我目前正在尝试为特定节点创建图形模式以对其进行查询。我试图按照显示的示例 here 进行操作,但遇到了标题中所述的错误。
属性 创建密钥
schema.propertyKey('id').Text().ifNotExists().create()
schema.propertyKey('name').Text().ifNotExists().create()
schema.propertyKey('age').Int().ifNotExists().create()
schema.propertyKey('location').Point().withGeoBounds().ifNotExists().create()
schema.propertyKey('gender').Text().ifNotExists().create()
schema.propertyKey('dob').Timestamp().ifNotExists().create()
使用的架构是
schema.vertexLabel("people_node").index("search").by("name").asText().by("gender").by("location").by("dob").ifNotExists().add()
schema.vertexLabel("people_node").index("people_node_index").materialized().by("id").ifNotExists().add()
schema.vertexLabel("people_node").index("people_node_index")secondary().by("age").ifNotExists().add()
示例数据
id, name , age, location , gender , dob
0, Betsy, 15 , POINT(10 15) , F , 1997-09-21T12:55:54+0400
遇到错误
java.lang.IllegalArgumentException: Cannot create search index, node workdload is not compatible
任何解决此问题的建议将不胜感激。
您需要在启用 DSE 搜索的情况下启动 DSE。根据安装方法,它可能是:
- 对于 tarball 安装 - 将
-s
标志传递给dse cassandra
命令 - 用于软件包安装 - 在
/etc/default/dse
文件中设置SOLR_ENABLED=1
并重新启动服务