Map<String, String> config = new HashMap<String, String>();
config.put("dbms.pagecache.memory", "50000M");
config.put("dbms.pagecache.pagesize", "8g");
config.put("node_auto_indexing", "true");
db = BatchInserters.inserter("dblp2.db", config);
indexProvider = new LuceneBatchInserterIndexProvider(db);
index = indexProvider.nodeIndex("dblpIndex", MapUtil.stringMap("type", "exact"));
index.setCacheCapacity(KEY_PROPERTY, 500000001);
........
Label label = DynamicLabel.label(author);
long nodeId = db.createNode(null, label);
......
if ((totalEntity % 50000) == 0) {
index.flush();
}
.......
Long nodeId = db.createNode(props, labels.toArray(new Label[labels.size()]));
.......
db.createRelationship(entityKeyNodeMap.get(key), distinctAuthors.get(author), RelTypes.WRITTEN_BY, null);
......
if ((totalEntity % 50000) == 0) {
index.flush();
System.out.println("relationship: " + totalEntity);
}
System.out.println("indexProvider shutting down");
indexProvider.shutdown();
System.out.println("db shutting down");
db.shutdown();
System.out.println("program is finished!");
}
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<messages.log>
<DBLPImporter.zip>