Neo4jClient - 从 Neo4jClient 中创建索引?

2024-04-26

有没有办法在 Neo4jClient 中创建索引?我已经完成了原始查询,但认为这不是最好的选择。我这样做的原因是出于测试目的,我需要删除/重新创建数据库来测试不同设计的性能。


你可以做这样的索引:

graphClient.Cypher
    .Create("INDEX ON :Label(Property)")
    .ExecuteWithoutResults();

和约束,例如:

graphClient.Cypher
    .CreateUniqueConstraint("identity", "property")
    .ExecuteWithoutResults();

(最初是从如何在 Neo4j v2 中使用 Neo4jClient 创建节点? https://stackoverflow.com/questions/19534511/how-to-create-a-node-with-neo4jclient-in-neo4j-v2)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Neo4jClient - 从 Neo4jClient 中创建索引? 的相关文章

随机推荐