有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

通过java在neo4j中获取索引值相同的所有节点?

如何通过java获得neo4j中索引值相同的所有节点

例如,我在节点的name属性上有一个索引,两个节点都有name="alice"。在基于索引进行搜索时,我想用java获取这两个节点


共 (1) 个答案

  1. # 1 楼答案

    你查过索引的文档了吗? http://docs.neo4j.org/chunked/stable/indexing.html

    IndexManager index = graphDb.index();
    Index<Node> idx= index.forNodes( "nodes" ); //this is the name of your index
    IndexHits<Node> hits = idx.get( "name", "alice" );