无法在janusgraph中创建索引

lndjwyie  于 2021-06-13  发布在  ElasticSearch
关注(0)|答案(1)|浏览(724)

我已经安装了janusgraph 0.5.2和scylladb 4.2.1以及elasticsearch 6.6.0,我正在尝试根据以下文档创建全文索引:

1. mgmt = graph.openManagement()
2. PropertyKey value = mgmt.makePropertyKey('value').dataType(String.class).make()
3. mgmt.buildIndex('verticesByValue', Vertex.class).addKey(value, Mapping.TEXT.asParameter()).buildMixedIndex("search")
4. mgmt.commit()

它在我输入3之后抛出这个错误。步骤:

No signature of method: org.janusgraph.graphdb.database.management.ManagementSystem$IndexBuilder.addKey() is applicable for argument types: (org.apache.tinkerpop.gremlin.structure.T$4, org.janusgraph.core.schema.Parameter) values: [value, mapping->TEXT]
rqdpfwrv

rqdpfwrv1#

而不是:

PropertyKey value = mgmt.makePropertyKey('value').dataType(String.class).make()

使用此选项:

value = mgmt.makePropertyKey('value').dataType(String.class).make()

当我使用“propertykey”类型赋值时,我能够生成问题。

相关问题