我当前正在尝试为特定节点创建图形架构,以在其上进行查询。我试图按照此处显示的示例,并遇到了标题中所述的错误。
创建的属性密钥
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
,然后重新启动服务