FAQ Database Discussion Community
java,neo4j
I want to use neo4j libraries to connect my java app with neo4j database and follow the tutorials from http://neo4j.com/docs/stable/tutorials-java-embedded-hello-world.html. At the beginning I copied the sources code from https://github.com/neo4j/neo4j/blob/2.2.2/community/embedded-examples/src/main/java/org/neo4j/examples/EmbeddedNeo4j.java and netbeans complains about missing libraries like: import org.neo4j.graphdb.Direction; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Node; import...
java,graph,neo4j,cypher,spring-data-neo4j
I have one node in neo4j whose structure looks like: { "nodeId": 32, "id": "0290cf88-3345-4c30-8e5f-7ce0cb3f0b6b", "type": "User", "name": "Mahendra", "index": 0, "data": "This is sample user", "description": null, "contentBlocks": [], "icon": null, "createdOn": null, "modifiedOn": null, "properties": { "displayName": "Mahendra", "lastName": "Kawde" }, "tags": [ "tag1", "tag2" ], "categories": null...
neo4j,cypher
given a node, I want to use D3 to graph it, and it's neighborhood 3 deep. The best strategy I can come up with is: Query1: MATCH (n)-[r]-(m) WHERE id(n) IN [501] RETURN n, r, m Then from the results, in my app, collect all of m's id's, put those...
neo4j,recommendation-engine,graphaware
The title says pretty much all. I'm trying to use neo4j-reco by GraphAware on top of neo4j-1.9. However, I don't know if it is possible at this time.
neo4j,cypher
I can find last node like this MATCH p=(a)-->(b)-->(c) WHERE a.name='Object' AND c:Prime RETURN c But how i would find last node if i don't know how many relationships -->()-->() between two nodes? I am trying to find last Node name by the Lable name. Last node doesn't have any...
c#,neo4j,neo4jclient
I am trying to use params to pass in relationship types dynamically with Neo4jclient but it didn't seem to work. Is this possible? Or what would be the equivalent? Basically I am trying to write a utility method to relate two nodes together by simply passing in two node Id...
neo4j
I am trying to setup a graph database, I have two csv files . I have successfully setup on of the csv's, the first one works fine. First CSV : LOAD CSV WITH HEADERS FROM "file:///C:/Users/rraina/Desktop/acc.csv" AS csvLine MERGE (providerName:ProviderName { name: csvLine.providerName }) MERGE (container:Container { name: csvLine.CONTAINER })...
neo4j,uniqueidentifier
Is using a tree with a counter on the root node, to be referenced and incremented when creating new nodes, a viable way of managing unique IDs in Neo4j? In a previous question on performance on this forum (Neo4j merge performance VS create/set), the approach was described, and it occurred...
neo4j,spring-data-neo4j
I am trying to filter feeds which contains user actvitity. I am using @QueryResult object to retrieve the result. I need both the feeds and the relationship information of user Liked Feeds. But while retrieving the feeds getting error: org.neo4j.rest.graphdb.entity.RestNode cannot be cast to java.lang.Iterable. (I am using SDN 3.3.0.RELEASE...
neo4j,cypher
Starting from an item recommended by people, is there a way to filter on a person property, such as age, while traversing at long distance friendship relationships? For instance in the following cypher query, I'd like to only traverse nodes of person +18y, not just filtering on p's age. MATCH...
java,spring,neo4j,spring-data-neo4j
Good Evening, I am using SDN 3, and am running into problems with removing simple relationships (RelateTo) in my underlying graph. The scenario is that I want to establish a Friend request/approval system amongst Users in my web application. I have no problem issuing the request by creating a "HAS_REQUESTED"...
python,neo4j,py2neo
I need a way to reach a previous state of the graph (i.e undo X number of changes). Is it possible to store the data, so that later you can replace the graph by that copy? Or is it possible to export the graph to a file and then load...
java,neo4j,cypher
I access a neo4J database via Java and I want to create 1,3 million nodes. Therefore I create 1,3 million "CREATE" statements. As I figured out, the query is way too long. I only can execute ~100 CREATE statements per query - otherwise the query fails: Client client; WebResource cypher;...
java,neo4j,spring-data-neo4j
I am new to Neo4j. I am trying some application in Java using Neo4j 2.2.2 along with Spring Data. I am using spring-data-neo4j (2.2.2.RELEASE) to connect the Neo4j DB. I have successfully done all CRUD opertaions using repositories in Spring Data. But I am unable to open & view this...
neo4j
We are currently working with a Neo4j database, and we need some kind of id to identify nodes. For example we have functions like CurrentUserHasAccess(NodeId) On other Stackoverflow posts I read that it's a bad idea to use the internal neo4j-identifier, because it can change over time. However I think...
mongodb,neo4j,graph-databases,document-store
I have to convert this mongoDB document into a neo4j. This is an example of document: { "_id" : "Atl.02", "official_name" : "Club Atletico de Madrid S.A.D.", "common_name" : "Atletico Madrid", "country" : "Spain", "started_by" : { "day" : 26, "month" : 4, "year" : 1903 }, "stadium" : {...
neo4j
I have 2 node Labels : Account , Transactions. MATCH (n:Account) RETURN n returns me 4 accounts with this property's: accountName RAHUL RAINA id 16294736 accountName SAVINGS ACCOUNT - RES id 16294732 accountName VISA GOLD id 16294492 accountName SBCHQ-GEN-PUB-IND-NONRURAL-INR id 16294488 Transactions is like this : MATCH (n:Transaction) RETURN n...
java,spring,neo4j,spring-data-neo4j-4
is there pagination support for custom queries in SDN4? If yes, how does it work? If no, is there a workarround? I have the following Spring Data Neo4j 4 repository: @Repository public interface TopicRepository extends GraphRepository<Topic>,IAuthorityLookup { // other methods omitted @Query("MATCH (t:Topic)-[:HAS_OFFICER]->(u:User) " + "WHERE t.id = {0} "...
neo4j,cypher
I've got the following query, which responds with the very cryptic error message of "Invalid input 'H': expected 'i/I' (line 2, column 2)" Here's the query: CREATE UNIQUE (c:AccountCharge)-[:ACCOUNT_CHARGED]->(a:Account) WHERE (a.ID = "a7f7def6-8f2b-4b21-bfac-dab2f6e6eaae") AND (c.ID = "666b1865-e29d-455b-abb0-50d679952543") Both the nodes exist, and I can't see where there's a break anywhere,...
neo4j
I did an explicit upgrade of a Neo4j database from 2.1.6 to 2.2.2 a couple of days ago. Everything seemed fine at first but yesterday I started to get a lot of: Exception: System.AggregateException: One or more errors occurred. ---> Neo4jClient.NeoException: EntityNotFoundException: Relationship with id 93669 and enter codException: System.AggregateException:...
neo4j
I want to run the dbinfo -g "High Availability" command over the Neo4J API. Does such an endpoint exist?...
mongodb,neo4j,gremlin
I finished to create my Mongo database. It is made on two collections: 1. team 2. coach I give you an example of the documents contained in these collections: Here is a team document: { "_id" : "Mil.74", "official_name" : "Associazione Calcio Milan S.p.A", "common_name" : "Milan", "country" : "Italy",...
java,neo4j,spring-data,spring-data-neo4j-4
When adding multiple relationships between nodes simultaneously, only some of them are created. In the example below, the calls to makeUser(...) are only populating some of the relationships. Main @Transactional void clearDatabase() { session.execute("MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r"); } void createPeople() { Person mark = new Person("Mark"); mark.password...
python,neo4j,graph-databases,py2neo
I am using py2neo to import several hundred thousand nodes. I've created a defaultdict to map neighborhoods to cities. One motivation was to more efficiently import these relationships having been unsuccessful with Neo4j's load tool. Because the batch documentation suggests to avoid using it, I veered away from an implementation...
import,neo4j,spring-data-neo4j-4
I am using Neo4j 2.2.1 and Spring Data Neo4j 4.0.0 and I am trying to import a timetree-like graph (with next, first, last, and child relationships), but with only 2 levels. I save at the root object and I got the following exception (due to the huge size, I omitted...
indexing,neo4j,lucene
I have a graph that has only Schema indexes and not legacy indexes as Neo4j documentation recommends. I want to search for nodes like in this example described under the legacy indexing section (exact match, start queries etc). I am wondering if this is possible with schema indexes and if...
graph,neo4j,cypher,relationship
I am a newbie in Cypher. I am trying to find a query which will returns nodes having more than one relationship to other nodes. Please refer to http://neo4j.com/docs/snapshot/images/cypher-match-graph.svg for the structure. I am trying to find the person who has acted in some movie(s) and also a father. When...
neo4j,cypher,spring-data-neo4j,graph-databases
In continue to this question Neo4j how to delete nodes recursively from some start node I have moved to Neo4j 2.2.2 and now have a problem with one Cypher query that works fine on a previous Neo4j 2.1.7 I use Spring Data Neo4J: @Query("MATCH (d:Decision) WHERE id(d) IN {decisionsIds} WITH...
jpa,neo4j,datanucleus,kundera,hibernate-ogm
I have a Java project that use an embedded Neo4j database (NoSQL), version 2.0.0. I need to migrate this data for a traditional relational db (SQL). For this job, I thought that using an implementation of JPA could help. I found these three projects: Hibernate OGM DataNucleus Kundera But I...
import,neo4j,runtime-error,stack-overflow,spring-data-neo4j-4
I am using the Spring Data Neo4j 4.0.0 with Neo4j 2.2.1 and I am trying to import a timetree-like object with 2 levels under the root. The saved object is built and saved at the end and at some point of the saving process, I got this StackOverFlow error: Exception...
neo4j,cypher
I'm using the rest api, and cypher. How do I get back the primary key when doing a query like this for a node with some id that I have assigned to it? {"statements" : [ {"statement" : "MATCH (n) where n.id = { id } RETURN n", "parameters" :...
neo4j
The problem is the same no matter if I am using Safari or Chrome. After running several times the same query shown below, I am getting the error: Disconnected from Neo4j. Please check if the cord is unplugged. I am able to SSH to the server and run the query...
neo4j
Currently I am trying this query on Neo4j 2.2.2 At the time of this post, we have not labeled any nodes yet as we recently upgraded from Neo4j 1.x. so we don't have the option of making use of the USING clause. I am trying to uses indices but ending...
neo4j
I have modified the 'vanilla' initial query in this console, and added one relationship type 'LOCKED' between the 'Morpheus' and 'Cypher' nodes. How can I modify the existing (first-run) query, which is a variable length path so that it no longer reaches the Agent Smith node due to the additional...
neo4j,cypher
When you give someone x something y for some price for ever - it's called "sell". But when you give someone x something y for some price for some time - it's called "rent". And when it's operation have no cost it's called "present". I would like to use neo4j...
java,rest,neo4j
I'm starting to use the Neo4j Rest Api but when I try to connect the server I get the following error : { "errors" : [ { "code" : "Neo.ClientError.Security.AuthorizationFailed", "message" : "No authorization header supplied." } ] } This error seems to be normal because I am not authenticating...
neo4j,special-characters,backticks
In my where clause I am trying to escape a special character "#" by following the manual's recommendation regarding backticks when creating a node: WHERE line.`The #` IS NOT NULL AND line.`Person's First/Last Name` IS NOT NULL However, when I do this, I get message: No data returned, and nothing...
date,neo4j,cypher,graph-databases
I'm trying to match listing availabilities in my graph (Airbnb-like). The graph has 1 node per date, and consecutive days are linked by a NEXT_DAY edge. Listings are linked to day nodes by an AVAILABLE edge (if they are available) I'm trying to write a query which returns all listings...
neo4j,cypher
I tried to load csv data into embedded neo4j database(v2.1.7、on windows). The csv file has 1,000,000 rows(1 Million). And data model is simple too. just as following: csv data "num1","num2","datatime" "13931345724","18409958023","2014-12-31 12:00:00" "13931345724","13710622859","2014-12-31 12:00:00" "13931345724","18919875049","2014-12-31 12:00:00" "13931345724","13460873081","2014-12-31 12:00:00" ... loading cypher sql USING PERIODIC COMMIT 5000 LOAD CSV FROM 'file:C:/tmpFiles/calls100w.csv'...
python,neo4j,py2neo
A ConstraintViolation error arises when I try an import statement in py2neo, but this same error never appears when I import directly in neo4j's shell. I'm using the same exact statement in both, where in py2neo I simply use graph.cypher.execute(...). Note that I have multiple times ensured that each ID...
neo4j,cypher
Code from LIKE clause in CYPHER Query MATCH (n) WHERE n.name =~ '(?i).*SUBSTRING.*' RETURN n; results in Expected 1 to be a java.lang.String, but it was a java.lang.Long (cause of =~) Is there a way to for strings case insensitive in all possible places?...
neo4j,cypher,py2neo
The model is for recording all the browse history How could I summation/average/find_max/find_min for all the pages browse to page 2 The expected answers are summation all the browsed time to page2 : 100+200+300+500 find_max browse time to page2 : 500 find_min browse time to page2 : 100 average browse...
neo4j,spring-data-neo4j
Is it possible to have full access to my neo4j graph with spring framework if I haven't build the graph with using spring? I am trying some examples and it seems that it's not working properly as some metadata that spring creates don't exists. EDIT: For example I have this...
database,mongodb,neo4j
I want to study the performances of two differents type of database; particularly I'm going to study a MongoDB database and a Neo4j database. Are there any sites that allow database's download? ...
java,neo4j,guava
I've coded a traversal in Java which returns an Iterable. The worst case is an Iterable size of 850784 relationships. Objective: I want to sample (without replacement) only 20 relationships and I want to do it fast. Solution 1 : performing a toList() or casting it in some sort of...
intellij-idea,gradle,neo4j,junit4,spring-data-neo4j-4
I confess I am a total newbie at the Java way of doing things and I am totally lost trying to get a simple unit test running. I am building a data access library and want to unit test it. I am using Spring Data Neo4j 4.0.0.BUILD-SNAPSHOT because I need...
neo4j,cypher
This is my graph I am trying to make a query that tells me if the connections from a node of type T exist to nodes of type M. I heard that OPTIONAL MATCH is equivalent to SQL Left Join, but it does not include the the missing link. Here...
spring,maven,neo4j,cypher,spring-data-neo4j
I'm working on a java project using spring-data and neo4j. I tried to write a cypher query using the predicate EXISTS but I have an error telling me "nested exception is Unknown function 'EXISTS'". I have the following pom.xml : <properties> <aspectj.version>1.7.4</aspectj.version> <js.basedir>src/main/webapp/js</js.basedir> <jsonpath.version>0.9.1</jsonpath.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>...
neo4j,cypher
Having the flowing data model: (Phone{phoneNumber})-[:CALL]-(Phone{phoneNumber}) (Person{personId})-[:KEEP]-(Phone{personId}) (Case{caseId})-[:INVOLVE]-(Person{personId}) all these three are using bidirectional relationship. And created index on phoneNumber/personId/caseId. User can input one or more strings which maybe represent as phoneNumber/ caseId/personId to query for their relationships(NOT consider direction and relationship depth can be 1 to 4). Here is...
database,graph,neo4j,cypher,graph-databases
I created a large neo4j graph connecting users to the videos they watch like user -> video in a social graph or network type of graph. There are about 9000 user nodes and 20000 video nodes. If I try: MATCH (u)-[:VIEW]->(v) RETURN u,v The graph says "Displaying 300000 nodes, 0...
pagination,neo4j,graph-databases
Currently am working in NEO4J and iam new in graph db. Now i need to paginate the records from graph db. And i created the following query MATCH (n:Question)<-[r1:HAS_QUESTION]-(c:Chapter) MATCH (c)-[r2:HAS_CHILD]->(t:Topic)-[r3:HAS_QUESTION]->(qstn:Question) WHERE ID(c)=330 WITH n,qstn WHERE NOT(n:Removed) AND NOT(qstn:Removed) WITH n,qstn RETURN n as Question,qstn In this query i got...
neo4j,lucene,analyzer
I am trying to use the Lucene FrenchAnalyzer with Neo4J: final GraphDatabaseService graphDatabaseService = new GraphDatabaseFactory().newEmbeddedDatabase("..."); final IndexManager index = graphDatabaseService.index(); final Index<Node> frenchIndex = index.forNodes("Entry", stringMap(IndexManager.PROVIDER, "lucene", "type", "fulltext", "to_lower_case", "true", "analyzer","org.apache.lucene.analysis.fr.FrenchAnalyzer" )); but this throws java.lang.NoSuchMethodException:...
neo4j,cypher
in neo4j, I'm graphing all nodes that have > x number of connections of relationship r with the following query: match (c:Company)-[r:founder]-(x) with c, count(r) as count where count > 3 return c The above code outputs a graph visualization of company nodes only. If I try to return all...
neo4j,cypher,py2neo
The path is representing for users' browse history. The upper path means there's one user who has browsed page A -> page B -> page C The lower path means, one user browsed page X-> page Y -> page B -> page C For example, If I want to calculate...
neo4j
I am currently sending json batches (mass creating nodes and relationships) to my neo4j instance at http://host:7474/db/data/batch. These batches have grown in size and now I am getting the error shown below. Seemingly this error is caused when trying to create the response to the request, which is just too...
indexing,neo4j
I am using Neo4j-server and I am trying to find a way to configure a legacy index either with cypher or with a property. So far to enable the legacy indexing I just uncommented the related line in neo4j.properties file. How can I apply some of the configurations listed here...
spring,neo4j,spring-boot,spring-data-neo4j
The project https://github.com/neo4j-contrib/developer-resources/tree/gh-pages/language-guides/java/spring-data-neo4j produces a warning: Class 'org.springframework.data.neo4j.support.index.IndexProvider' is marked deprecated I use Spring Boot. The managed version for spring-data-neo4j is 3.2.2.RELEASE Does anybody know how this deprecation can be resolved?
neo4j
I want to add value path in neo4j graph such as (United States - Population - 2015) this path has value 320,970,000 and I want store in database This is what i want Can anyone help me? or any suggestion?...
neo4j,cypher
I have a simple database with three types of nodes (t:transcripts, f:protein families and g:genes. There are two types of relationships, PFAM_MRNA (t)-[r]->(f) and Parent (t)-[p]->(g). (g:Gene{Name:'g1'})<-[p:Parent]-(t:transcript{Name:'t1'}) (g:Gene{Name:'g1'})<-[p:Parent]-(t:transcript{Name:'t2'}) (g:Gene{Name:'g2'})<-[p:Parent]-(t:transcript{Name:'t3'}) (g:Gene{Name:'g3'})<-[p:Parent]-(t:transcript{Name:'t4'}) (g:Gene{Name:'g4'})<-[p:Parent]-(t:transcript{Name:'t5'})...
jpa,neo4j,cypher,jpql
I have that Neo4j Cypher request that I need to convert to JPQL: MATCH (p:Person)-[:worksForOrganisation]-> (:Organisation)-[*0..2]->(:Organisation) -[:possessesResource|:accessesResource|:supportsResource]->(:Software) <-[:categoryContains]-(c:ResourceCategory) WHERE id(p)=({personId}) RETURN c This request starts from a unique Person with identifier personId. We know that this person works for one (in rare cases, many) Organisations. We know that each organisation...
neo4j,cypher
This code MATCH (n { name: 'Create node' })<-[r*]-(s { name: ';' }) WITH n,s, LENGTH(r) AS depth RETURN n,s, depth will return amount of relationships between first and last nodes. Is it possible to get nodes that in that relationships? Bonus question: is it possible to get them in...
neo4j,cypher,aggregate
I have the following Cypher script: MATCH (sy:SchoolYear)<-[:TERM_OF*]-()<-[:DAY_OF]-(d:Day) WHERE sy.year = 2015 OPTIONAL MATCH (d)<-[:START]-(e:Enrollment)-[:AT]->(s:School) RETURN d.date, s.abbreviation, count(e) ORDER BY d.date This gives me all of the dates in the range that I want and returns number of students that have enrolled for each school for that date, or...
neo4j,cypher
Why this code doesn't work MATCH (n) WHERE labels(n)=~ '(?i).*SUBSTRING.*' RETURN distinct labels(n) Type mismatch: expected String but was Collection (line 1, column 17 (offset: 16)) But this does match n-[r]-() where type(r)=~ '(?i).*SUBSTRING.*' return distinct type(r) ...
java,neo4j
I am developing a Question Answering application using Neo4j in Java. For that I need to find intermediate nodes between given two nodes through any relationship. For Example given Graph: A - x -> C B - y -> C Therefore if given [A,B] nodes, the output should be [C],...
neo4j,cypher
Is it possible to pass parameters along with a cypher query via Neo4j's web interface or shell? For example, is it possible to get Neo4j's web interface to execute this statement? return {test}; Running this statement in the web interface results in an error: Expected a parameter named test Neo.ClientError.Statement.ParameterMissing...
neo4j,graphaware
i am trying to track latest changes in neo4j in Server Mode so i followed this link https://github.com/graphaware/neo4j-changefeed as i see some extra node are added and here are changes about my db but http://localhost:7474/graphaware/changefeed/CFM gives me 404 i am using neo4j 2.2.2 and my neo4j.properties com.graphaware.runtime.enabled=true com.graphaware.module.CFM.1=com.graphaware.module.changefeed.ChangeFeedModuleBootstrapper com.graphaware.module.CFM.maxChanges=100 com.graphaware.module.CFM.pruneDelay=10000...
neo4j,py2neo
I am using py2neo with transactions. This means I am using the Cypher language. I am appending the textual Cypher statements to a transaction queue and submitting the contents of the queue in one shot with commit. It works fine. However, it is slow. I am getting about 100/nodes per...
neo4j,cypher
If I have a cypher query that unwinds a parameter, everything after that portion of the query is called x number of times of the unwind. I'd like to figure out a way to end the unwind and continue with other things. MATCH (thing:Thing) UNWIND { names } AS name...
neo4j,cypher
The question: What is the most performant way to create the following MATCH statement and why? The detailed problem: Let's say we have a Place node with a variable amount of properties and need to look up nodes from potentially billions of nodes by it's category. I'm trying to wrap...
logging,neo4j,py2neo
How can I stop py2neo from spitting out each created relationship/node, like the following: (http://localhost:7474/db/data/' ref=u'relationship/13441' start=u'node/13446' end=u'node/3' type=u'IN' properties={}>,) As encouraged by this page, when I set the below line to OFF java.util.logging.ConsoleHandler.level=OFF I silence logging when I call a function which creates the relationship/node. However, if I directly...
java,neo4j
I am executing a query in neo4j using java. I don't know how to check if the execution result is empty. Here is my code. String firstquery=" start n=node(*) match(b)-[relatedto]->(n) where b.value=\""+applicationName+"\" return n"; ExecutionResult execResult = execEngine.execute(firstquery); System.out.println("executing query"); String results = execResult.dumpToString(); System.out.println(results); Iterator<Node> n_column1 = execResult.columnAs( "n"...
javascript,node.js,class,express,neo4j
I have some troubles with a .js Object's atribute which is not updating when i ask it to. I'm new in the javascript world, so i hope my issue won't be tricky. First of all, this is a part of my Node class : Node = function (label, vals, db,...
java,neo4j,jetty-8
Everything works fine when I deployed using Tomcat 7. http://localhost:7474/browser can be showed successfully(also webadmin). Using Neo4j 2.1.7 But when changed to deploy my application into Jetty 8 (actually in solr's Jetty 8.1.10), everything worked fine (my web application can get data from embedded neo4j database correctly) except accessing /browser...
merge,neo4j,cypher,nodes,graph-databases
Here is what I want to do: Connect users to the videos they watch like user -> video in a social graph or network type of graph. How I did it: LOAD CSV WITH HEADERS FROM 'asdfjkl;' AS line CREATE (u {user: line.user }) - [:VIEW] -> (v {video: line.video})...
neo4j
Using Neo4j's Batch Import Tool, how can I create multiple nodes from a single row, and then attribute some properties to Node 1 and some to Node 2? This is an example from 29.3: movieId:ID,title,year:int,:LABEL tt0133093,"The Matrix",1999,Movie tt0234215,"The Matrix Reloaded",2003,Movie;Sequel tt0242653,"The Matrix Revolutions",2003,Movie;Sequel Is there a way to make it...
arrays,neo4j
.Hi, I'm importing data into a Neo4j graph. I've imported "Topics", some of which have .aliases set as an array, some don't. LOAD CSV WITH HEADERS FROM "file:///home/michael/db/Aliases.csv" AS r MATCH (t:Topic { mysql_id: toInt(r.id)}) SET t.aliases = [] + t.aliases + split(r.aliases, ';') + r.alias; // Where t.aliases, r.aliases,...
spring,neo4j,spring-data,spring-data-neo4j
I have three NodeEntities A, B, and C. A is the parent of B and C. C has a property of type Set. For all three entities I have also a PagingAndSortingRepository. The Spring Boot application is set up as in the example https://spring.io/guides/gs/accessing-neo4j-data-rest/. Now there is a strange thing:...
database-design,neo4j
What is the proper case for using the Property attribute of a Relationship in Neo4j? (Including examples of when and when not to use them) Example Consider a computer used by Team A and Team B, where each team have their own internal value id for the computer: Node =...
neo4j,cypher
I'm trying to make a html view of everything known about a node. So, if i were to select that node n and RETURN n, i'd get a json object with n: { stuff ... }, and if i also return its relationships and connected nodes RETURN n,r,n2, now i...
neo4j,cypher
I have a data model that's a tree structure with a max depth of 3. For example: (a) ... first level root node / | \ / | \ (b) (b) (b) ... [0..n] number of second depth nodes / | | / | | (c) (c) (c) ... [0..n]...
ruby-on-rails,ruby,neo4j,neo4j.rb
I'm currently working through this tutorial and I'm stuck when it comes to creating relationships in the rails console. I've read through the Neo4jrb project documentation and a blog post on jayway.com but still can't figure it out. I've created a rails site and I want to create team nodes,...
merge,neo4j,load-csv
I'm loading a file using the LOAD CSV command,and i have a strange situation, when a new row gets a propery added in the "on match" block. here is the code: USING PERIODIC COMMIT 10000 LOAD CSV WITH HEADERS FROM 'file://1.csv' AS line FIELDTERMINATOR '|' WITH line, split(line.list_ites, ',') AS...
maven,elasticsearch,neo4j,lucene
I am developing a Question answering application and for that I need to use neo4j and elasticsearch in the same maven project. I am using elasticsearch to make my application more robust. As we know that neo4j and elasticsearch works on different version of lucene, so whichever version I include...
java,neo4j
I am using Neo4j graph database and the Neo4j Cypher api of java to get the query result.A dump to string method will give the execution result in the string format. GraphDatabaseFactory graphDbFactory = new GraphDatabaseFactory(); GraphDatabaseService graphDb = graphDbFactory.newEmbeddedDatabase("C:/TPNeo4jDB"); ExecutionEngine execEngine = new ExecutionEngine(graphDb); ExecutionResult execResult = execEngine.execute("MATCH (java:JAVA)...
neo4j,graphaware
Is it possible to construct something like GraphAware's TimeTree using Neo4j's CLI, GraphAware's importer, Michael Hunger's batch import, or with py2neo? It would be optimal to be able to do this using Neo4j's CLI (in terms of set up). I want to be able to search for a certain kind...
neo4j,cypher
I'm working with a data set that contains customers, their purchases and the businesses they purchased from, and I'm trying to determine which businesses share the highest number of mutual customers. Ideally the output would be a table that lists the connected businesses and the number of mutual customers. I.e.:...
neo4j,cypher
MATCH (f:Feed) WHERE f.feedType = 'sports' RETURN f order by f.timeAdded desc SKIP 4 LIMIT 10 I have User node and Feed node. I want to retrieve feeds related to sports with pagination. For that I have written the query as above. But with this I also need to know...
neo4j
I struggle to write a query, that will return info about most played tracks for every user. I go with something like this: MATCH (l:Listener)-[lo:LOGS]->(s:Scrobble)-[f:FEATURES]->(t:Track)<-[p:PERFORMS]-(a:Artist) with l,a,count(*) as numberOfScrobbles return l.name, a.title, numberOfScrobbles and get a list of values: User name - Artist name - Number of scrobbled tracks created...
neo4j,cypher
I have a cypher query (below). It works but I was wondering if there's a more elegant way to write this. Based on a given starting node, the query tries to: Find the following pattern/motif: (inputko)-->(:cpd)-->(ko2:ko)-->(:cpd)-->(ko3:ko). Foreach the motifs/patterns found, find connected nodes with labels contigs, for the following nodes...
c#,generics,neo4j,neo4jclient
Following is the code for which the error is being generated: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Neo4jClient; using Neo4jClient.Cypher; namespace ConsoleApplication1 { public class SNode { public int shelfid { get; set; } public int floorid { get; set; } } public class PathsResult<TNode> { public...
regex,neo4j,cypher
I am searching in Neo4j using a regular expression. I would like this search to be global. As it stands, the search will only find words that start with inputted letters in the regular expression: MATCH (a) WHERE a.name =~ '(?i)bob.+' RETURN a.name So it will find the name Bob...
java,eclipse,neo4j
I am just starting out with Neo4j and this is my first stackoverflow question! I tried to run the Hello-World example in Eclipse with the user library of Neo4j. ( https://github.com/neo4j/neo4j/blob/2.2.2/community/embedded-examples/src/main/java/org/neo4j/examples/EmbeddedNeo4j.java) I only changed the DB_PATH='data/graph.db' ( because in my neo4j-server.properties :org.neo4j.server.database.location=data/graph.db) The output I got in the console is:...
c#,graph,neo4j,neo4jclient
I want to create some nodes of type Person and Books using Neo4jClient. To do that, I have class Person like this: Public Class Person { Public String Name; } To create node, I have written something like this: Var RefA = client.Create(new Person(){Name ="John"}); (Client -> GraphicClient) When I...
bash,neo4j,docker
I'm using the following docker: https://registry.hub.docker.com/u/tpires/neo4j/ I've started the docker neo4j container with: docker run -i -t -d --name neo4j --cap-add=SYS_RESOURCE -p 7474:7474 -p 80:80 tpires/neo4j and in the neo4j interface, I'm trying to load from remote CSV: LOAD CSV FROM "http://mywebsite.com/data/data.csv" AS line WITH line LIMIT 4 RETURN line...
java,neo4j
We are testing neo4j 2.2.2 with java 8u45 but we are seeing an error when we start neo4j. ERROR! Neo4j cannot be started using java version 1.8.0_45. * Please use Oracle(R) Java(TM) 7 to run Neo4j Server. Download "Java Platform (JDK) 7" from: http://www.oracle.com/technetwork/java/javase/downloads/index.html * Please see http://docs.neo4j.org/ for Neo4j...
neo4j,cypher
I'm trying to get all nodes whose name starts with an "A" match n where substring(n.name, 0,1) = "a" return n returns zero results. What is the right way to do this?...
neo4j,cypher
Let's say we have the example query from the documentation: MATCH (n:Actor) RETURN n.name AS name UNION MATCH (n:Movie) RETURN n.title AS name I know that if I do that: MATCH (n:Actor) RETURN n.name AS name LIMIT 5 UNION MATCH (n:Movie) RETURN n.title AS name LIMIT 5 I can reduce...
neo4j,cypher
MATCH (n:User) SET n: Influence RETURN n ORDER BY n.Followers DESC LIMIT 10 This code will first set a new label for all the User nodes and then return the first 10. What i'm trying to do is to set a new label just for the 10 first returned nodes....
regex,neo4j,cypher
I'm storing e-mail addresses within some user nodes that I'm trying to match against, however the (?i) case-insensitive option doesn't appear to work when a + is added in the mail address. I use these to test, for example [email protected] Setting up test nodes: CREATE (uWithoutSymbol:USER { email: '[email protected]' })...
neo4j,graph-databases
I would like to delete all the nodes of a certain label by executing match (P:ALabel) delete P; This returns the comment "No data returned." It also states how many Nodes deleted, and how long it took (5767 ms). However, the shell seems to stop responding after this, and I...