neo4j

How do you set up neo4j to work with Google Compute Engine?

旧时模样 提交于 2019-12-30 03:41:09
问题 I'm wondering how one would get neo4j to work with Google Compute Engine. Has anybody done this? What problems did you encounter? 回答1: Here you go, Basic Setup Install and setup gcloud Install py2neo Create your GCE Instance (https://console.developers.google.com/project/PROJECT_APPID/compute/instancesAdd) using image (debian-7-wheezy-v20141021, Debian GNU/Linux 7.7 (wheezy) amd64 built on 2014-10-21 or ANY) SSH your instance gcloud compute ssh INSTANCE_NAME --zone AVAILABLE_ZONES -->

Best way to delete all nodes and relationships in Cypher

♀尐吖头ヾ 提交于 2019-12-30 01:54:22
问题 What is the best way to cleanup the graph from all nodes and relationships via Cypher? At http://neo4j.com/docs/stable/query-delete.html#delete-delete-a-node-and-connected-relationships the example MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r has the note: This query isn’t for deleting large amounts of data So, is the following better? MATCH ()-[r]-() DELETE r and MATCH (n) DELETE n Or is there another way that is better for large graphs? 回答1: As you've mentioned the most easy way is to

Neo4j集群介绍

◇◆丶佛笑我妖孽 提交于 2019-12-29 22:36:50
Neo4j集群介绍 Neo4j主要有两种cluster方式:Ha和Causal cluster方式。 集群的主要特点:高吞吐量,持续可靠性,灾难恢复 1. 基本介绍: Causalcluster: 主要由两部分组成, 1. 核心服务器(core server):处理读写的操作,大多数的core server主要处理写操作 2. 一个或多个读复制服务器(read replicas):这些是只读的实例,数据从core server异步更新,这些适用于广泛的数据地理分布,并允许跨大量服务器扩展查询工作负载。 HA cluster: 至少有三台服服务器组成,1主2从,主服务器完成写入之后同步数据到从服务器,主服务器既可以写也能读,从服务器只能读。 2. 优缺点及试用场景 causal cluster: Neo4j3.1中引入了因果集群,以支持地理区域之间的数据复制,并在发生多个硬件和网络故障时支持持续的读写操作。主要是支持在地区直接保持数据的同步,对硬件和网络的容错率高。 High avaiable :HA群集可用于全天候正常运行并提高读取性能。适用于需要全天候运行并需要提高查询效率的场景 3. 总结 如果需要使用集群方式,选择HA,而且在本地部署causalcluster,一般需要三台core server,三台replicasserver,HA可以满足大部分应用场景。

Cypher query gives unnecessary relationships

瘦欲@ 提交于 2019-12-29 09:13:07
问题 I am trying to display only one relevant relationship in the cypher query web browser but it displays all the relationships in between nodes. I am running following query: MATCH (emp:Employee)-[e:EMPLOYED {dateendrole:"Current"}]->(c:Company {companyname:"xyza"}) MATCH (emp)-[ea:EDU_ASSOCIATED]->(ec:Company) MATCH (another_emp:Employee)-[ea1:EDU_ASSOCIATED {overlapyearstart:ea.overlapyearstart, overlapyearend:ea.overlapyearend}]->(:Company {comp_id:ec.companyId}) RETURN emp, e, c, ea, ec,

How to provide your services via @Context in Neo4j unmanaged extension

半城伤御伤魂 提交于 2019-12-29 08:12:41
问题 I have Neo4j unmanaged extension. I want some services to be created as singletons and be available via @Context in my resources. Something like this: @Path("/example") public class ExampleResource { public ExampleResource(@Context CostlyService costlyService) { // <<--- // use it here } } How this can be achieved? 回答1: Neo4j has PluginLifecycle interface that give us possibility to hook into Neo4j server lifecycle and provide our own services for injection blog post. So, we have service. Let

How to provide your services via @Context in Neo4j unmanaged extension

淺唱寂寞╮ 提交于 2019-12-29 08:12:31
问题 I have Neo4j unmanaged extension. I want some services to be created as singletons and be available via @Context in my resources. Something like this: @Path("/example") public class ExampleResource { public ExampleResource(@Context CostlyService costlyService) { // <<--- // use it here } } How this can be achieved? 回答1: Neo4j has PluginLifecycle interface that give us possibility to hook into Neo4j server lifecycle and provide our own services for injection blog post. So, we have service. Let

Where is neo4j-server.properties on Windows?

左心房为你撑大大i 提交于 2019-12-29 06:22:05
问题 On Windows, where is neo4j-server.properties as described in this documentation? http://docs.neo4j.org/chunked/stable/security-server.html I can't find it anywhere, and creating it myself in places that seem reasonable have no effect. I'd like to be able to access the server from a remote IP other than localhost . Thanks. Update Neo4j is installed at C:\Program Files\Neo4j Community\bin\neo4j-community.exe I've created the file at C:\Program Files\Neo4j Community\conf\neo4j-server.properties

Where is neo4j-server.properties on Windows?

ε祈祈猫儿з 提交于 2019-12-29 06:21:36
问题 On Windows, where is neo4j-server.properties as described in this documentation? http://docs.neo4j.org/chunked/stable/security-server.html I can't find it anywhere, and creating it myself in places that seem reasonable have no effect. I'd like to be able to access the server from a remote IP other than localhost . Thanks. Update Neo4j is installed at C:\Program Files\Neo4j Community\bin\neo4j-community.exe I've created the file at C:\Program Files\Neo4j Community\conf\neo4j-server.properties

Update to: Adding node to Neo4j Spatial Index

独自空忆成欢 提交于 2019-12-29 04:28:07
问题 I'm hoping someone can provide some updated clarification on adding nodes to Spatial. The best instructions I can find is: Neo4j Spatial 'WithinDistance' Cypher query returns empty while REST call returns data However it's almost 2 years old and has some contradictory information with an acknowledged bug (https://github.com/neo4j-contrib/spatial/issues/106), which appears to still be open. I also found this tutorial: http://mattbanderson.com/setting-up-the-neo4j-spatial-extension/ Which says

Gremlin remove all Vertex

≯℡__Kan透↙ 提交于 2019-12-29 03:57:22
问题 I know how to remove a vertex by id, but I need to delete multiple vertices (clean the db). Deleting 1 v is like this: ver = g.v(1) g.removeVertex(ver) 回答1: you can try g.V.each{g.removeVertex(it)} g.commit() 回答2: In more recent terms as of Gremlin 2.3.0, removal of all vertices would be best accomplished with: g.V.remove() UPDATE: For version Gremlin 3.x you would use drop(): gremlin> graph = TinkerFactory.createModern() ==>tinkergraph[vertices:6 edges:6] gremlin> g = graph.traversal() ==