neo4j

Neo4j Spatial 3.0.2: No index provider 'spatial' found

六月ゝ 毕业季﹏ 提交于 2019-12-24 03:25:51
问题 I am trying to create a spatial database with neo4j 3.0.2 and neo4j-spatial for 3.0.2. I have installed the plugin and I have checked that the plugin is running with cURL curl -v http://neo4j:neo4j@localhost:7474/db/data/ which outputs following: { "extensions" : { "SpatialPlugin" : { "addSimplePointLayer" : "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer", "addNodesToLayer" : "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addNodesToLayer",

Upgrading a neo4j database from 2.0.1 to 2.1.3 fails

半城伤御伤魂 提交于 2019-12-24 03:23:12
问题 I'm trying to upgrade my neo4j store, running on windows, from 2.0.1 to 2.1.3. What i have done, starting with a working 2.0.1. environment, is the following: .\2.0.1\bin\neo4jinstall.bat remove xcopy .\2.0.1\data\findsi.graphdb .\2.1.3\data\findsi.graphdb .\2.1.3\bin\neo4jinstall.bat install This will fail with the message: Detected incorrectly shut down database, performing recovery.. My (2.1.3) messages.log file tells me this: 2014-08-11 09:45:46.352+0000 ERROR [o.n.k.EmbeddedGraphDatabase

Fetch a tree with Neo4j

≡放荡痞女 提交于 2019-12-24 03:09:29
问题 Given a forest of trees in a Neo4j REST server, I`m trying to return a single tree given the root vertex. Being each tree quite large, I need a de-duplicated list of all vertices and edges in order to be able to reconstruct the full tree on the client side. I tried multiple combinations around MATCH (r:root)-[*]->() but they return any path starting from the root, thus with lots of duplicates: MATCH p = (r:root)-[*]->(x) RETURN nodes(p) AS Vertices, rels(p) AS Edges"; this returns each and

Count node depth in neo4j

浪子不回头ぞ 提交于 2019-12-24 03:06:22
问题 I have this query in Neo4j: MATCH (sentence:Sentence)-[r*]->(n:Word ) WITH n, COUNT(r) AS c RETURN n, c My graph is a linguistic database containing words and dependency relations between them. This query should return depth of nodes, however the COUNT(r) always returns 1. When I ommit the COUNT function and write just WITH n, r AS c instead (trying in web browser neo4j interface), neo4j returns multiple relations for each word node "n" as expected. Can you please help me what am I doing

Neo4j Cypher: Handling whitespace and wildcards in a Lucene fulltext search

喜夏-厌秋 提交于 2019-12-24 02:42:46
问题 I created a FullText index named: myFullTextIndex . When I want to search for the pattern: Hello World , the query looks like: START w=node:myFullTextIndex('title:"Hello World"') That works pretty well. However, I don't manage to search for the same string surrounded by wildcards. I expect a search on this pattern to return a result: *Hello World* I tried: START w=node:myFullTextIndex('title:"*Hello World*"') and START w=node:myFullTextIndex('title:*"Hello World"*') but doesn't work (syntax

How to chain commands in Gremlin?

此生再无相见时 提交于 2019-12-24 02:25:24
问题 The following command works t = new Table(); g.V.as('id').as('properties').table(t){it.id}{it.map} print t The following command works t = new Table(); g.V.as('id').as('properties').table(t){it.id}{it.map}; print t The following command doesn't work t = new Table(); g.V.as('id').as('properties').table(t){it.id}{it.map}; print t Why? 回答1: The fast answer: You need to iterate your pipeline. The long answer: In the Gremlin REPL, iteration will happen for you automagically if your last statement

How to model relationships between sets of nodes

孤街浪徒 提交于 2019-12-24 01:47:06
问题 I am currently looking at modelling tertiary courses and other such entities (MATH101, BIOL360, BSc etc.), and one of the options we're looking at is graph databases. I am not familiar with graph databases, other than in theory. One of the things I am trying to model is requirements, for example "MATH201 requires the student previously completed MATH101". That one seems easy - I can create a vertex between the two. Others are more complicated: "Bachelor of Computer Science requires 40 points

“Invalid use of aggregating function in this context” in a SET query (Neo4j)

时光毁灭记忆、已成空白 提交于 2019-12-24 01:19:25
问题 I wonder why this is considered an invalid use of aggregate functions in Neo4j's Cypher: MATCH (p:Project)-[:EMPLOYS]-(n:Person) SET p.youngest = MIN(n.age); While the following is considered a valid use case: MATCH (p:Project)-[:EMPLOYS]-(n:Person) RETURN p.name, MIN(n.age) AS youngest; How should I rewrite the first query to make it valid? 回答1: As for "why" your original Cypher attempt does not work, and the answer by @mah does work: Cypher only permits aggregation functions to be used in

How to associate multiple value to a property using cypher queries in Neo4j

天涯浪子 提交于 2019-12-24 01:17:22
问题 I have 2 nodes created in graph database, origin airport and destination airport. It is related by a property named 'delayed_by'. I need to associate multiple values to this property 'delayed_by'. There are various reasons for delays such as weather delay, carrier delay, nas delay and I need to link all of them to this property in graph database. I am expecting values as that of below tabular format in graph database ORIGIN DEST carr_delay weather_delay nas_delay ABE ATL 492 56 56 I used the

Neo4j 3.1.0 apoc.load.csv trouble

假装没事ソ 提交于 2019-12-24 01:09:45
问题 I keep trying to run a apoc.load.csv procedure in the newest version of Neo4j 3.1.0, and APOC 3.1.0.3. CALL apoc.periodic.iterate('CALL apoc.load.csv("file:///data.csv", {sep:",", header:TRUE}) yield map ',' with {map} as map MATCH (t:Tweet{id:toFloat(map.tweet_id)}) SET t.clean_text = map.clean_text, t.positive_score = toInt(map.nb_positive), t.negative_score = toInt(map.nb_negative), t.sentiment_score = toInt(map.score)', {batchSize:5000, parallel:true}) Error: Failed to invoke procedure