自動インデックス機能を使用して Neo4J にデータをインポートすることはできますか? 次の例のように、BatchInserter と BatchInserterIndex を使用してデータをインポートしようとしています。
BatchInserter inserter = BatchInserters.inserter("/home/fmagalhaes/Neo4JDatabase");
BatchInserterIndexProvider indexProvider = new LuceneBatchInserterIndexProvider(inserter);
BatchInserterIndex nodeIndex = indexProvider.nodeIndex("node_auto_index", MapUtil.stringMap("type","exact"));
BatchInserterIndex relIndex = indexProvider.relationshipIndex("relationship_auto_index", MapUtil.stringMap("type","exact"));
...
inserter.createNode(vertexId, properties);
nodeIndex.add(vertexId, properties);
...
問題は、バッチ処理が完了したときに、次のようにしてブループリントのジェネリック API でこのデータベースを開こうとしていることです。
Graph g = new Neo4jGraph("/home/fmagalhaes/Neo4JDatabase");
Set<String> nodeIndices = ((KeyIndexableGraph)g).getIndexedKeys(Vertex.class);
Set<String> relIndices = ((KeyIndexableGraph)g).getIndexedKeys(Edge.class);
nodeIndices と relIndices の両方が空です。ブループリント API でグラフ データベースを開くと、自動インデックス機能が無効になります。ブループリント API を使用してデータベースを開いたときに、このインデックスが表示されるようにバッチ処理中に自動インデックスを作成することは可能ですか?