neography从索引中获取实际节点或节点id

neography从索引中获取实际节点或节点id,graph,nosql,neo4j,neography,Graph,Nosql,Neo4j,Neography,我使用以下方法从索引中获取节点: neo.get\u node\u index('nodes\u index','type','repo') 这很好用。但是,返回的数据是哈希对象,如下所示: > {"indexed"=>"http://localhost:7474/db/data/index/node/nodes_index/type/repo/12", "outgoing_relationships"=>"http://localhost:7474/db/data/node/

我使用以下方法从索引中获取节点:

neo.get\u node\u index('nodes\u index','type','repo')

这很好用。但是,返回的数据是哈希对象,如下所示:

> {"indexed"=>"http://localhost:7474/db/data/index/node/nodes_index/type/repo/12", "outgoing_relationships"=>"http://localhost:7474/db/data/node/12/relationships/out",
> "data"=>{"name"=>"irc-logs"},
> "traverse"=>"http://localhost:7474/db/data/node/12/traverse/{returnType}",
> "all_typed_relationships"=>"http://localhost:7474/db/data/node/12/relationships/all/{-list|&|types}",
> "property"=>"http://localhost:7474/db/data/node/12/properties/{key}",
> "self"=>"http://localhost:7474/db/data/node/12",
> "properties"=>"http://localhost:7474/db/data/node/12/properties",
> "outgoing_typed_relationships"=>"http://localhost:7474/db/data/node/12/relationships/out/{-list|&|types}",
> "incoming_relationships"=>"http://localhost:7474/db/data/node/12/relationships/in",
> "extensions"=>{},
> "create_relationship"=>"http://localhost:7474/db/data/node/12/relationships", "paged_traverse"=>"http://localhost:7474/db/data/node/12/paged/traverse/{returnType}{?pageSize,leaseTime}",
> "all_relationships"=>"http://localhost:7474/db/data/node/12/relationships/all",
> "incoming_typed_relationships"=>"http://localhost:7474/db/data/node/12/relationships/in/{-list|&|types}"}
我希望返回实际的节点对象,或者能够轻松检索id。通过id,我指的是
http://localhost:7474/db/data/node/12

我可以通过regex获得它,但这肯定不是最好的方法?

您可以使用以下方法来查找它

n=Neography::Node.find('nodes_index','type','repo')

n.neo#u id#12