Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 py2neo 将初始数据上传到 neo4j 并使用批处理使其更快。我想知道是否有一种方法也可以使用批处理创建索引。
谢谢
我为此找到了一个很好的解决方案。有WriteBatch()方法add_index_node 例如,
WriteBatch()
add_index_node
batch = neo4j.WriteBatch(graph_db) a = batch.create(node(name='Alice')) batch.add_index_node("people","name","alice",a) batch.submit()