neo4j

Neo4j Spatial over REST through the JAVA API not working (for me)

六月ゝ 毕业季﹏ 提交于 2020-01-04 05:51:07
问题 I'm working on a Grails app over Neo4J which I'd like to also export as a GIS database. Looking at the examples for how to use neo4j in GeoServer/uDig it appears that the Spatial integration is only via embedded neo4j databases. Does anyone know whether it's possible to set things up so that my Neo4J is available over REST, so that I can interface to it from a variety of places? At first sight it appears that it ought to be possible: // Works with this embedded database //def graphDb = new

Load only few samples from large csv file in neo4j

我是研究僧i 提交于 2020-01-04 05:36:39
问题 I am new for neo4j db. I've a large csv file which cannot fit in my machine's ram. Before I load all the records in db using USING PERIODIC COMMIT , I want to test my cypher query on the small sample of data. How can I load load just 1000 rows of data and test out my query. The data has columns in simplified form as [Employee, CompanyName] . I want to create relationship as (:Employee)-[:Employed]->(:Company) . The Employee and the CompanyName nodes are already loaded into the database. 回答1:

How to display all nodes on screen in neo4j

我只是一个虾纸丫 提交于 2020-01-04 05:19:10
问题 I have a almost 5000 nodes of Recipes and 5 nodes of Meal_Types in neo4j database. Right now there is no relationship between them. I am running CQL below: MATCH (n) RETURN n LIMIT 100000 This is running fine, but it is returning node related to Recipes only. There may be something hidden, I mean there might be nodes related to Meal_Types but as they are in same color it is very hard to differentiate them. So is there a way to bring all nodes to dispaly with different colors respectively? 回答1

Can I parameterize labels and properties on CREATE or SET? (REST and transaction)

一笑奈何 提交于 2020-01-04 04:16:09
问题 I have a query 1. CREATE (a:%1$s {props}), (b:%2$s {props2}), (b)-[:%3$s {relProps}]->(a) 2. MATCH (a:%1$s { value:{value} })-[:%2$s]->(b) WHERE (b:%3$s) SET (b {props}) I'm using underscore.string to allow string format but would love to just stick with parameters. Is it possible to parameterize labels such as { "query": CREATE (a:{label} {props}), "params": { "label":"SomeLabel", "props":{....} } } and is it also possible to parameterize properties on a SET? { "query": "MATCH ..... SET

Add properties to Neo4j Dynamically

你离开我真会死。 提交于 2020-01-04 04:04:25
问题 How to add a new property dynamically to an existing node ? Here I wan to assign both key and value dynamically to my chypher query.. Any suggestions will be highly appreciated :) 回答1: You can create a map with key value pairs and add the pairs with SET . Example 1: Add properties, will erase the others WITH {name:"Kenny", age:10} as kv MATCH (n:Person {uid:"123-fff"}) SET n = kv Example 2: Append properties, will replace values of existing keys : WITH {name:"Kenny", age:10} as kv MATCH (n

Add properties to Neo4j Dynamically

ε祈祈猫儿з 提交于 2020-01-04 04:04:08
问题 How to add a new property dynamically to an existing node ? Here I wan to assign both key and value dynamically to my chypher query.. Any suggestions will be highly appreciated :) 回答1: You can create a map with key value pairs and add the pairs with SET . Example 1: Add properties, will erase the others WITH {name:"Kenny", age:10} as kv MATCH (n:Person {uid:"123-fff"}) SET n = kv Example 2: Append properties, will replace values of existing keys : WITH {name:"Kenny", age:10} as kv MATCH (n

Add properties to Neo4j Dynamically

天大地大妈咪最大 提交于 2020-01-04 04:04:06
问题 How to add a new property dynamically to an existing node ? Here I wan to assign both key and value dynamically to my chypher query.. Any suggestions will be highly appreciated :) 回答1: You can create a map with key value pairs and add the pairs with SET . Example 1: Add properties, will erase the others WITH {name:"Kenny", age:10} as kv MATCH (n:Person {uid:"123-fff"}) SET n = kv Example 2: Append properties, will replace values of existing keys : WITH {name:"Kenny", age:10} as kv MATCH (n

Neo4j Cypher : transfer all relationships before replacing a node by another

大憨熊 提交于 2020-01-04 03:25:22
问题 I'm trying to transfert all ingoing and outgoing relationships from a node to another, before deleting the first one. they both have the same label. I saw this Neo4j Cypher: copy relationships and delete node but in my case i don't know the type of the relations and i want to transfer both ingoing and outgoing ones. i'm looking for either a cypher query or a query based on neo4j.rb 回答1: I don't think that this is possible with pure cypher. Here's a solution using neo4j.rb that I think will

Neo4j index query with regex

痴心易碎 提交于 2020-01-04 02:56:28
问题 I am trying to get likers for some artists through an index on Name : START n=node:Artist(Name =~ 'Michael*.') MATCH n<-[:LIKES]-liker return liker.Id, n.Label LIMIT 50 And I have this error : Invalid query string literal or parameter expected "START n=node:ArtistId(Name =~ 'Michael*.')" I am wondering how can I use regex in index query? I know I can use regex in match but I don't know how can I use regex in START. Thanks for your help 回答1: You can't use normal regex syntax, but you can use

cURL command - Neo4j

你。 提交于 2020-01-04 02:53:27
问题 I have a problem in using of cURL as HTTP clinet with Neo4j. When I write this command : curl http://localhost:7474/db/data/ (or any URL, like http://localhost:7474/db/data/node/ ) Then I get this result in JSON format: { "errors" : [ { "message" : "No authorization token supplied.", "code" : "Neo.ClientError.Security.AuthorizationFailed" } ], "authentication" : "http://localhost:7474/authentication" } 回答1: It seems that you have the authentication plugin enabled on your server. https:/