neo4j

How do I connect to a remote Neo4j database using gremlin python?

随声附和 提交于 2019-12-07 03:26:45
问题 From what I've read Neo4j implements apache tinkerpop which leads me to think I can use gremlin python and rather than connect to a gremlin server I can point the python code at a neo4j server and treat it like a gremlin server. However I can't find any information online which shows how to do this so I'm thinking maybe I've misunderstood something. a) Can I use gremlin python directly with a neo4j db instance? b) If yes to (a) then how? Thanks Alex 回答1: You can not connect gremlin-python to

Neo4j in the cloud [closed]

China☆狼群 提交于 2019-12-07 03:11:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Is anyone aware of cloud services (PaaS) which could be suitable for a spring/neo4j application. Anything to look out for? 回答1: AFAIK, Amazon EBS is currently the only stable option, Heroku is in private beta and Cloud Foundry is work in progress. 回答2: Neo4j is available on Heroku now. Details in this document

Trying to execute a list of Cypher statements in Neo4j via the admin interface

情到浓时终转凉″ 提交于 2019-12-07 02:54:54
问题 I have a file that contains a long list of Cypher statements, something like: create (n:oeuvre {ide12:"41",numpers:[87603],titre:"JE PARS"}); create (n:oeuvre {ide12:"151",numpers:[395225,364617,396308,306762],titre:"I DID IT FOR LOVE"}); create (n:oeuvre {ide12:"67",numpers:[54001],titre:"GRAND PERE N AIME PAS LE"}); create (n:oeuvre {ide12:"80",numpers:[58356],titre:"MON HEURE DE SWING"}); create (n:oeuvre {ide12:"91",numpers:[58356],titre:"AU QUATRIEME TOP"}); When I drag my file on the

How to check array property in neo4j?

浪尽此生 提交于 2019-12-07 02:28:37
问题 How to search node using cypher query where one of the node property having array of string ? e.g. members-- > ["abc","xyz","pqr"] . I can find the node by keeping order of array elements in same manner, for e.g. START root=node(*) where has(root.members) and root.members=["abc","xyz","pqr"] return root; but How to search node if I do not / cannot provide the exact order of elements as they are in node property ? 回答1: Use the "all" predicate to ensure every element in the root.member is in

How to insert an array of objects (bulk-insert) into neo4j with bolt protocol (javascript)

杀马特。学长 韩版系。学妹 提交于 2019-12-07 02:05:36
问题 1.Send an http post with objects array to server [{id:1, title: ‘one’}, {id:2, title:’two’}] 2.Receive post on server and bulk insert into neo4j with bolt let data = req.body; //set up bolt let db = require('neo4j-driver').v1; let driver = db.driver('bolt://localhost', db.auth.basic('neo4j', ’neo4j’)); let session = driver.session(); 3. Set up statements for execution // start transaction for(var i=0; i>data.length; i++) { //add CREATE statements to bolt session ??? "CREATE (r:Record {id:1,

Why do I get a “Cartesian Product” warning?

此生再无相见时 提交于 2019-12-07 02:05:22
问题 I am still trying to understand why I get a cartesian product warning for a certain format for a query in neo4j and not for another. This is how I set up my database: CREATE (q:Form {version: "1.0"}) CREATE (q:Question {text: "Sector de la empresa", active: true}) I then tried the following query: MATCH (f:Form {version: "1.0"}), (q:Question {text: "Sector de la empresa"}) CREATE (f)-[:asks]->(q) RETURN f, q However, I get the following warning: This query builds a cartesian product between

How to determine property value type within a node in neo4j?

白昼怎懂夜的黑 提交于 2019-12-07 01:09:00
问题 Currently - there does not appear to be a way to determine if a property value in a node (or relationship) is an array/collection or a string. match (n) where isArray(n.myprop) .... this would be super handy when trying to understand the types of data you are working with relative to your updates and queries. Specifically, if you had situations were you were trying to update property values and needed to know "how" to update them based on how the current values were stored. 回答1: Right now

Getting top n records for each group in neo4j

主宰稳场 提交于 2019-12-07 01:06:02
问题 I need to group the data from a neo4j database and then to filter out everything except the top n records of every group. Example: I have two node types : Order and Article. Between them there is an "ADDED" relationship. "ADDED" relationship has a timestamp property. What I want to know (for every article) is how many times it was among the first two articles added to an order. What I tried is the following approach: get all the Order-[ADDED]-Article sort the result from step 1 by order id as

neo4j - how do I model node schema less?

﹥>﹥吖頭↗ 提交于 2019-12-07 01:04:35
I read some where that noe4j or other nosql database is schemaless. so what is the schemaless? I would like to know more about it with use case. Joerg Baach You don't need to define a schema like you would have to do e.g. in mysq with a table. Instead, you can add properties and their value to each individual node (entry), as you like. E.g: if you look at the address book in an android phone a person entry can have a multitude of properties - phone numbers, addresses, names. Some people have a lot of attributes, some have none. Doing something like that with a schema (e.g. table structure) is

Cypher to return total node count as well as a limited set

半城伤御伤魂 提交于 2019-12-06 23:47:49
问题 Is it possible to extract in a single cypher query a limited set of nodes and the total number of nodes? match (n:Molecule) with n, count(*) as nb limit 10 return {N: nb, nodes: collect(n)} The above query properly returns the nodes, but returns 1 as number of nodes. I certainly understand why it returns 1, since there is no grouping, but can't figure out how to correct it. 回答1: The following query returns the counter for the entire number of rows (which I guess is what was needed). Then it