使用java连接JanusGraph进行创建图操作,报错地方是程序运行第50行代码其作用是生成混合索引,截图如下:
后在0.6版本官方文档发现有说明先贴一份截图:
具体说明如下:
The example above defines a mixed index containing the property keys name and age. The definition refers to the indexing backend name search so that JanusGraph knows which configured indexing backend it should use for this particular index. The search parameter specified in the buildMixedIndex call must match the second clause in the JanusGraph configuration definition like this: index.search.backend If the index was named solrsearch then the configuration definition would appear like this: index.solrsearch.backend.
意思就是buildMixedIndex这个方法的参数要与所指定的配置文件的写的索引配置第二个子句一致,比如我的是:index.search.backend=elasticsearch
那么buildMixedIndex的参数就应该为search,后来第50行代码修改以后就不报错了