neo4j

neo4j 2.0 having trouble starting

可紊 提交于 2019-12-20 03:52:18
问题 I have my DB_Path String DB_PATH = "path/to/data/graph.db" then I am running GraphDatabaseService graphDb = new EmbeddedGraphDatabase(DB_PATH) In which I am met with (full exception) Exception in thread "main" java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager@10f102d3' was successfully initialized, but failed to start. Please see attached cause exception. at org.neo4j.kernel.InternalAbstractGraphDatabase

Neo4j Show Only Specific Relations in the Browser Graph View

血红的双手。 提交于 2019-12-20 03:50:24
问题 I have this Cypher query: MATCH (i:Issue {name:"SN-229"})-[d:ON_DATE]->(s:Stage) RETURN i,(MAX(d.long)-MIN(d.long)+1) AS Days,s and I get these results in the Neo4j Browser's Text view Which are the answers I want. But when I view the result in the Neo4j Browser's Graph view, it insists on displaying the individual dates in the relationships!?!? What query could I write to show me this "ideal" Graph view (the displayed dates are the MIN(d.long) dates) or at least just display the relationship

Neo4j how to delete nodes recursively from some start node

有些话、适合烂在心里 提交于 2019-12-20 03:23:54
问题 In my Neo4j database I have a following entities: @NodeEntity public class Product { private final static String CONTAINS = "CONTAINS"; private final static String DEFINED_BY = "DEFINED_BY"; private final static String VOTED_FOR = "VOTED_FOR"; private final static String PARENT = "PARENT"; private final static String CREATED_BY = "CREATED_BY"; @GraphId private Long id; @RelatedTo(type = PARENT, direction = Direction.INCOMING) private Product parent; @RelatedTo(type = CONTAINS, direction =

How to specify relationship type in CSV?

耗尽温柔 提交于 2019-12-20 03:23:13
问题 I have a CSV file with data like: ID,Name,Role,Project 1,James,Owner,TST 2,Ed,Assistant,TST 3,Jack,Manager,TST and want to create people whose relationships to the project are therein specified. I attempted to do it like this: load csv from 'file:/../x.csv' as line match (p:Project {code: line[3]}) create (n:Individual {name: line[1]})-[r:line[2]]->(p); but it barfs with: Invalid input '[': expected an identifier character, whitespace, '|', a length specification, a property map or ']' (line

Query case-specific nodes in neo4j

我与影子孤独终老i 提交于 2019-12-20 03:17:25
问题 I have a setup like the attached image. Orange nodes denotes the cases and the Blue nodes denotes the Performers of various activities within that case. I would like to query each case in turn. Within each case, I need to add relationship [:RELATED {value: 1}] from node i to node k , for all k that lies in between(nodes whose ID fall between i and j) those pair of Performer nodes ( node i , node j ) such that : Name(node i ) == Name( node j ) and | ID(node i ) - ID(node j ) | >= 2 [Example

neo4j - how to run queries with 1000 objects via rest api

拜拜、爱过 提交于 2019-12-20 03:14:42
问题 I'm need run queries with 1000 objects. Using /batch endpoint I can get this to work but is too slow (30 seconds with 300 items). So I'm trying the same approach as said in this docs page: http://docs.neo4j.org/chunked/2.0.1/rest-api-cypher.html#rest-api-create-mutiple-nodes-with-properties POST this JSON to http://localhost:7474/db/data/cypher { "params": { "props": [ { "_user_id": "177032492760", "_user_name": "John" }, { "_user_id": "177032492760", "_user_name": "Mike" }, { "_user_id":

How to configure a query timeout in Neo4j 3.0.1

吃可爱长大的小学妹 提交于 2019-12-20 02:47:06
问题 I'd like to set a query timeout in neo4j.conf for Neo4j 3.0.1. Any query taking longer than the timeout should get killed. I'm primarily concerned with setting the timeout for queries originating from the Neo4j Browser. It looks like this was possible in the past with: execution_guard_enabled=true org.neo4j.server.webserver.limit.executiontime=20000 However, this old method doesn't work for me. I see Neo4j 3.0 has a dbms.transaction_timeout option defined as a "timeout for idle transactions".

Full text search in Neo4j with spaces

穿精又带淫゛_ 提交于 2019-12-20 02:42:29
问题 When the neo4j lucene auto index is in exact mode (which is the default) queries of the type: start n=node:node_auto_index('name:asfd\\ a*') return n Work correctly (assuming you have a node with the name asdf adsf for instance. However when switching the index to "fulltext" mode following these instructions (including deleting the index and reassigning the indexed property), then the same query doesn't return any results. Original Question Trying to search neo4j via the full text index when

Neo4j cypher query : using ORDER BY with COLLECT(S)

匆匆过客 提交于 2019-12-20 02:32:41
问题 I'm having a hard time collecting data from two distinct sources and merge the collections so that the final one is a set of objects ordered by 'dateCreated'. Context Users can ask questions in groups. A question can be either general or related to a specific video-game. If the question asked in a group is video-game related, this question also appears in the video-game's questions page. Currently, I have two general questions and one specific to one video-game. Hence, when fetching the

Neo4j / Strategy to keep history of node changes

 ̄綄美尐妖づ 提交于 2019-12-20 02:24:04
问题 Let's assume a graph dealing with cars. Each Car can evolve over time, and I need to keep track of those changes. (in order to be able to track some inconsistency of evolution etc...) I thought about implementing a copy-on-write mechanism (like LinkedIn seems to do), meaning creating a complete new Car node each time one of the Car 's properties changes. I would end up with a graph like this: (Ferrari)-[:CURRENT]->(V3)-[:PREVIOUS]->(V2)-[:PREVIOUS]->(V1) I'm specifically interested in