我正在使用 BatchInsert 和 LuceneIndexBatchInserter api 来创建我的图表(目前约为 10000 个节点)。事情是 BatchInserter.createNode(...) 返回一个长的。
BatchInserter inserter = new BatchInserterImpl( DB_PATH, BatchInserterImpl.loadProperties( "neo4j.props" ) );
long node = inserter.createNode(properties);
其中 properties 是 Map(String,Object)。
我真正需要的是获得一个 Node 类型的新节点。
Node node = inserter.createNode(properties);
这样我可以使用 shortestPath api 并传入 startNode 和 targetNode。
那么,基本上,有没有办法可以从索引中获取一个节点作为节点而不是很长?
也许如果有人能解释为什么batchInserter返回一个long类型的节点而不是Node类型?希望这对某人有意义,谢谢。