2018-10-21         Claire

Neo4j cypher: Store timestamp as a node property

When trying to store a timestamp localdatetime() as node property updatedAt: MERGE (profile:Profile {userId:{id}}) SET profile += {userId:{id}, updatedAt:localdatetime()} RETURN profileI'm getting this error:Current record format does not support TEMPORAL_PROPERTIES. Please upgrade your store to the format that support requested capability.I'm running Neo4j 3.4.4 as a Docker container, version, so this error shouldn't be occurring. Is my cypher query wrong? I was able to fix this with:Removing all nodes: MATCH (n) DETACH DELETE n;Removing all graph.db labels an...

 neo4j                     1 answers                     92 view
 2018-10-21         Kevin

How to fetch pattern variable with node and relationships (if present)

Suppose, we have the following data in neo4j DB ->The java entity representation is as follows -> @NodeEntitypublic class Place { @Id @GeneratedValue private Long id; private String name;}@NodeEntitypublic class Monument { @Id @GeneratedValue private Long id; private String name;}@NodeEntitypublic class Person { @Id @GeneratedValue private Long id; private String name; @Relationship(type = "VISITED", direction = Relationship.OUTGOING) private Monument monument; @Relationship(type = "STAYS", direction = Relationship.OUTGOING) p...

 neo4j                     1 answers                     94 view
 2018-10-21         Isaac

Cypher path that doesn't cross certain nodes

I am new to cypher but struggling with what seems like a basic query.I need to get the paths between all nodes marked with property IsPrimaryEntity (PE)without the path including any other PE nodes(PE1)----(n1)------(n2)-(PE2)-(n3)-(PE3)-(PE4) \(n4)-(n5)---/would produce just 4 results(PE1)-(n1)-(n2)-(PE2)(PE1)-(n4)-(n5)-(n2)-(PE2)(PE2)-(n3)-(PE3)(PE3)-(PE4)Here's what I currently haveMATCH p=(s {IsPrimaryEntity: true})<-[*..10]->(o {IsPrimaryEntity: true})WHERE NOT s=oRETURN p,s,oIt's important not to return a path (PE1).....(PE4) ?thanks,Shaun It would help ...

 neo4j                     1 answers                     93 view
 2018-10-21         Madeline

Neo4J Cypher Query to Match Collections Against Other Collections

I'm new to Neo4J and really struggling on a query. This is not my actual domain, but I'm trying to simplify it down to a similar problem.Given:a Region contains Marketsa Market provides Fruit (e.g. Apple, Pear)a Market provides Vegetables (e.g. Cabbage, Broccoli)a Recipe requires Fruit (e.g. Apple, Peach)a Recipe requires Vegetables (e.g. Cabbage)I want:the list of Recipes that can be satisfied by the Markets in my RegionConceptually a way to solve this might be:create a combined list of all Fruits provided by Markets in the Regioncreate a combined list of all Vegetables pr...

 neo4j                     1 answers                     94 view
 2018-10-21         Carl

How do I debug Invalid Input cypher queries when configuring relationships? (Neo4j OGM)

Going through the Neo4j-OGM tutorial here, as soon as I wire in the @Relationship clause, I start getting the following Invalid Input error: WARN [main] (Neo4jSession.java:550) - Error executing query : Neo.ClientError.Statement.SyntaxError - Invalid input '|': expected whitespace, comment, a relationship pattern, '.', node labels, '[', "=~", IN, STARTS, ENDS, CONTAINS, IS, '^', '*', '/', '%', '+', '-', '=', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, ',' or ']' (line 1, column 105 (offset: 104))"MATCH (n:`Subject`) WHERE ID(n) = { id } WITH n RETURN n...

 neo4j                     1 answers                     96 view
 2018-10-21         Jesse

neo4j - Doesn't link a relation to a node that was create

I'm using Neo4j Server version: 3.4.4 (enterprise) and Neo4j Browser version: 3.2.5. When I run those commands :create (a:DVK {Naam : 'A'}) -[:IS_PROJECT_FOR]->(:DVL {Naam : 'C'})create (a) -[:IS_PROJECT_FOR]->(:DVL {Naam : 'B'})I have 4 nodes created : A, B, C and another node, and 2 relations. I was expecting to have 3 nodes : A, B, C with 2 relations.Can you tell me what I'm doing wrong and advice how to solve this issue ? Per the comments on the main question, it looks like you executed each query separately, not together in a single query.Remember that variabl...

 neo4j                     1 answers                     100 view
 2018-10-21         Marian

how can i install apoc in neo4j manually?

Are there any alternative methods other than what is described in the link below to install the package? Installing APOC via NEO4J DesktopWould it be possible to download from the repository? Please share any insights as to how to achieve this you can download the jar file and copy the jar file into the plugins folder. Then add the following line to $NEO4J_HOME/conf/neo4j.conf and restart neo4jdbms.security.procedures.unrestricted=apoc.*jar file:https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/ [XXX]

 neo4j                     1 answers                     99 view
 2018-10-21         Hogan

How to merge two nodes together and retain all links to the nodes in NEO4j / Cypher?

I am trying to merge 2 nodes together in NEO4j.Each node has it's own independent set of links to nodeA and nodeB.I want to merge all the attributes between nodeA and nodeB together as they have some different properties. Whilst also retaining all the links to both nodes in the newly merged node.How would I go about even doing this? You should have a look at APOC Procedures. The procedure apoc.refactor.mergeNodes does exactly what you are looking for.MATCH (f:Person {name:'Foo'}), (b:Person {surname:'Bar'})CALL apoc.refactor.mergeNodes([f,b])YIELD node RETURN nodeExample...

 neo4j                     1 answers                     101 view
 2018-10-21         Michelle

You have defined query method in the repository but you don't have any query lookup strategy defined

Yesterday this solution was working fine. Today I woke up to rerun the tests & it failed stating in the stacktrace that You have defined query method in the repository but you don't have any query lookup strategy defined. The infrastructure apparently does not support query methods! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.(RepositoryFactorySupport.java:533)As clearly shown I did not define any query methods. :-(I'm stuck, I shall try reverting to the previous version & see where we go from there...

 neo4j                     1 answers                     102 view
 2018-10-21         Elroy

Complex cypher queries with mathematical formula

I have a graph with 2 kinds of nodes: person & food. I have 1 kind of relationship - Ate with an attribute - count. Each time a person eats a food, the count attribute of the relationship gets incremented. My goal is to calculate similarity between two person nodes. I found this algorithm online to calculate the similarity and I want to use it. How does one convert this to a Cypher Query ?sim = 0for k = 1 to n: sim = sim + (1 - Math.abs((N1k/H1 - N2k/H2)))(N1k+N2k)/(H1+H2)where:sim = similarity index H1 = total number of food items eaten by person 1 H2 = total number o...

 neo4j                     2 answers                     105 view
 2018-10-21         Truda

Have problems building neo4j GetAll server extension

I have been trying to build the example GetAll neo4j server extension, but unfortunately I cannot make it work. I installed the Windows version of neo4j and run it as a server. I also installed Python neo4jrestclient and I am accessing neo4j through Python scripts. The following works fine: from neo4jrestclient.client import GraphDatabase gdb = GraphDatabase("http://localhost:7474/db/data/") print gdb.extensionsIt gives me "CypherPlugin" and "GremlinPlugin". I want to build the example GetAll server extension, which is Java. I am using Eclipse. I am able to create ...

 neo4j                     2 answers                     5 view
 2018-10-21         Andre

understanding cypher output

I have a graph like this:(2)<-[0:CHILD]-(1)-[1:CHILD]->(3)In words: Node 1,2 and 3 (all with names); Edges 0 and 1I write the following cypher-query:START nodes = node(1,2,3), relationship = relationship(0,1) RETURN nodes, relationshipand got as a result:==> +-----------------------------------------------+==> | nodes | relationship |==> +-----------------------------------------------+==> | Node[1]{name->"Risikogruppe2"} | :CHILD[0] {} |==> | Node[1]{name->"Risikogruppe2"} | :CHILD[1] {} |==> | Node[2]{name->"Beruf 1"}...

 neo4j                     2 answers                     10 view
 2018-10-21         Tammy

spring-data-neo4j: @Query with depth

I am using spring-data-neo4j v4.2.8.I have a NodeEntity with 2 EntityRelationship one is for incoming the other is for outgoing. I want to load the nodes with a specific filter using the repository @Query method. All relationship should be loaded with the node. This is my query @Query(value = "MATCH (n:`Person`) WHERE {0} IN labels(n) RETURN n")Iterable<Person> findAllByLabels(String label);=> I am loading nodes with two labels Person and a specific label.I have tried many things:using @depth in the methodspecifying the relationship in the query like this.@Query(value...

 neo4j                     2 answers                     16 view
 2018-10-21         Brandon

How can I get a plugin for neo4j 3.4.5 with gremlin console or server?

I intend to use the Neo4j-community database in version 3.4.5 with Gremlin commands.But I tried getting plugins but none are working for the later versions of neo4j.Can someone outline how I can resolve my requirements? As of right now, TinkerPop's neo4j-gremlin is built to work with Neo4j 3.2.3. That dependency is set via:https://github.com/neo4j-contrib/neo4j-tinkerpop-api-impl/blob/0.7-3.2.3/pom.xml#L23To see an upgrade, that library would need to be bumped to the version of Neo4j that you want and then neo4j-gremlin would need to be updated in TinkerPop:https://gith...

 neo4j                     1 answers                     21 view
 2018-10-21         Lawrence

how to use "apoc.util.md5" in embedded neo4j

I find some code examples here about enabling APOC in embedded neo4j.It is something like that i need to register the procedure's class.(but lack of description. wonder if there is official tutorial of that)I have added this in my pom.xml : http://mvnrepository.com/artifact/org.neo4j.procedure/apoc/ I guess there should be a class like apoc.util.Md5 to register, but it is seem no. On an embedded database you need to register your functions and procedures, can you try this : (GraphDatabaseAPI) getDatabase()).getDependencyResolver().resolveDependency(Procedures.c...

 neo4j                     1 answers                     58 view
 2018-10-21         Darlene

Neo4j Upgrade - https://yum.neo4j.org/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 503 - Service Unavailable

I am trying to upgrade Neo4j from repository on my Centos 7 Server, but when run yum update this is the error:yum updateLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfileepel/x86_64/metalink | 32 kB 00:00:00 * base: mirrors.prometeus.net * epel: mirror.infonline.de * extras: mirrors.prometeus.net * updates: mirrors.prometeus.netbase ...

 neo4j                     2 answers                     34 view

Page 1 of 126  |  Show More Pages:  Top Prev Next Last