如何仅使用密码在neo4j中创建空间索引? [英] How do I create a spacial index in neo4j using only cypher?

查看:84
本文介绍了如何仅使用密码在neo4j中创建空间索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想玩neo4j和空间索引.我找不到任何文档,只能通过REST API来演示如何通过密码进行此操作.

I want to play with neo4j and spacial indexes. I can't find any documentation that demonstrates how to do this through cypher, only through the REST API.

比如说在neo4j Web控制台中,是否有可能通过Cypher创建空间索引?

Is it possibly to create spacial indexes through Cypher, say in the neo4j web console?

推荐答案

当前无法使用Cypher创建空间索引.您可以使用Java API或REST调用,请参见

There is currently no way to create a spatial index using Cypher. You can either use java API or a REST call, see docs at http://neo4j-contrib.github.io/spatial/#rest-api-create-a-spatial-index for details. Since Neo4j browser allows to send HTTP POST you can type there:

:POST /db/data/index/node {"name":"geom", "config": 
  {"provider":"spatial", "geometry_type":"point", "lat":"lat", "lon":"lon"}
}

或者,您可以在neo4j-shell中使用index命令.

Alternatively you can use the index command within neo4j-shell.

Neo4j Spatial for 3.0提供了存储过程来管理空间索引-因此,所有事情都可以通过密码来完成.参见 https://github.com/neo4j-contrib/spatial/blob/master/src/main/java/org/neo4j/gis/spatial/procedures/SpatialProcedures.java . 注意:此版本尚未发布,因此您必须自己从源代码构建.

Neo4j Spatial for 3.0 provides stored procedures to manage the spatial index - and therefore everything can be done through cypher. See https://github.com/neo4j-contrib/spatial/blob/master/src/main/java/org/neo4j/gis/spatial/procedures/SpatialProcedures.java. Note: this version is not yet released, so you have to build from source yourself.

这篇关于如何仅使用密码在neo4j中创建空间索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆