neo4j

Neo4J windows installation

你说的曾经没有我的故事 提交于 2019-12-25 03:40:23
问题 Downloaded Neo4j community version, the file named "neo4j-desktop-offline-1.1.13-setup.exe". Running the binary successfully installed. Launching the application takes me to configuration of database location "Please choose path where you want to store application data" and regardless of what path i choose, clicking "Confirm" does not do anything at all and it remains on the same screen. Am using Windows 10. 回答1: I also got the same problem. I fixed it by adding a new PATH in environmental

How to retrieve the nodes with multiple relationships using cypher query

孤人 提交于 2019-12-25 03:38:15
问题 Can some one please help me on this. I am using cypher query to get the nodes that are having relationship as either 'hive' or 'hadoop' and i am able to get the nodes. but when i try to get the nodes that are having relationship as both 'hive' and 'hadoop' i am not able to get the nodes. This is the query i am using start n=node(*) match (n)-[r]-() where type(r)="Hadoop" and type(r)="hive" return n,count(n); This query returns 0 rows. Is my query wrong or do i need to do it the other way.

Set a transient property on a node neo4j

微笑、不失礼 提交于 2019-12-25 03:32:39
问题 Is there way to set a transient property on nodes returned by a cypher query such that it is only visible to the user running the query. This would allow us offload some controller logic directly into Neo4j and reduce business logic queries. Currently I have a list that is returned by List<Post> newsFeed (Long uid) {} Post is a relationship between a User and News node. I have two sub-classes of the Post object: BroadcastedPost MentionedPost I have two cypher queries that return the posts

How to store properties of a neo4j node as an array?

ぃ、小莉子 提交于 2019-12-25 03:23:11
问题 I am working on an HR analytics projects using neo4j and I encountered a complicated query (I am also very new to cypher). Basically, I have a list of employee with some features like location, skill set, education and positions with location, skills required. I look if location (employee’s location and position’s location) matches and set that score to 1 (0 otherwise). If I have only one open position, the query works fine. However, with more positions the variable gets overwritten with last

How to get all connected nodes, excluding specific relationships

风格不统一 提交于 2019-12-25 03:17:39
问题 I'm looking for a performant way of retrieving all connected nodes. However there is a twist. I would like to exclude nodes and consequent children, that are connected via certain relationship types. The attached figure illustrates my case. There are two or more clusters of nodes. I would like to retrieve all nodes of a single cluster, depending on the id inside the query. All other nodes (coming from different clusters) and connected via "LINK..." relations shall not be included. I know how

Select and insert by keeping references in Neo4J

允我心安 提交于 2019-12-25 03:15:56
问题 Suppose I have a set of Nodes in Neo4j db as bellow: CREATE (n:A { p1 : 2 }) //call this a1 CREATE (n:A { p1 : 3 }) // call this a2 CREATE (n:A { p1 : 8 }) // call this a3 Now I want to query this db and create another set of nodes and edges as the following: For each node labeled A whose p1 property is less than 5, create a new node with a label QA and connect this node to its origin (the A labeled node it comes from) . Is it possible to directly encode this with Neo4j query language? In

hierarchy property in graph database

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 03:14:01
问题 I'm starting to use neo4j. In my graph database I've the nodes Person (look at "John" below), with the labels: Name (string), Food (positive integer). Each Person is connected with other Person through the relationship isFriendTo , that has a value. I use the graph DB only to find the shortest weighted path between two person. Also, every day I check every node in the graph, and if the food go under value of 100, I take some actions. Now, after some improvements, the property Food is no more

All paths between two nodes neo4j - incorrect answer (from neo4j)

半世苍凉 提交于 2019-12-25 03:07:53
问题 I want to get all path between two nodes with the relation "->" between them. I ask my DB using query (Cypher) like that: START a=node(27), b=node(0) MATCH p=b<-[*]-a RETURN p In Neo4j visualization I get this: Cypher query visualization I want to get list of 3 path: 27 -> 81 -> .... -> 0 27 -> 67 -> .... -> 0 27 -> 24 -> .... -> 0 but in the result I have got 6 paths (instead of 3). I want to figure out why. 回答1: This happens because the query includes the 0 length paths starting from 'a'.

Does label mechanism provide auto-indexing features when using neo4j-java API?

冷暖自知 提交于 2019-12-25 03:05:10
问题 First of all, I bet that there is an answer on this question somewhere in docs, but since 'Manual: Labels and Indexes' link here gives me 404 error, I'm going to ask you anyway. Is it possible to create an index on some label and specify it as an automatic one (just like legacy indexes I'm currently using, but for labels)? If someone from neo4j team is reading this post, please let me know if I'm looking for the documentation in the right place, 'cause I can't find anything more or less

Differentiating Neo4j queries for different data files

偶尔善良 提交于 2019-12-25 02:59:00
问题 I'm using Neo4j 2.1.2. My query is that I have a 3 csv files with the same structure but with different data, say csv1, csv2, csv3. I loaded the csv1 with node and relationship information on Neo4j. Again I loaded csv2 with the same nodename and relationship name as the 1st csv and I did the same thing for csv2 as well. So when I fire the query without LOAD CSV command, then from which file will it file fetch the data? Do we need to add LOAD CSV command each time whenever we want to execute