neo4j

Neo4J cypher query to get nodes connected by paths with the same generic attribute

情到浓时终转凉″ 提交于 2019-12-11 05:45:54
问题 I'm trying to create a cypher query that returns me the nodes connected by a given range of hops (i.e. 1..5), where all the relationships between these hops share a same attribute value, without specifying this attribute. So I would like to do something like MATCH (a {type: 'cin1'})-[rels:Next*1.. {value: 1}]->(b {type: 'cancer'}) RETURN (a), (b) But without specifying that the value on the edges should be one, they just need to be equal among all the edges in the hopping process. 回答1: I

Where can I find neo4j jdbc driver? [closed]

冷暖自知 提交于 2019-12-11 05:41:22
问题 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 2 years ago . The official neo4j page has a mention to a jdbc driver test (here). But the jdbc link appear to be broken. Someone knows where can I find a jdbc driver (jar file) to neo4j? 回答1: 2.1.4 is the latest in the maven repository: https://maven-repository.com/artifact/org.neo4j/neo4j-jdbc Download from https://maven

Find cluster in Neo4j

删除回忆录丶 提交于 2019-12-11 05:31:40
问题 Hi I have a neo4j database, similar to below. CREATE (:Person {name: 'Ryan'})-[:TRADES]->(fish:Product {name: 'Fish'}), (ken:Person {name: 'Ken'})-[:TRADES]->(fish), (mary:Person {name: 'Mary'})-[:TRADES]->(fish), (john:Person {name: 'John'})-[:TRADES]->(fish), (ken)-[:TRADES]->(book:Product {name: 'Book'}), (ken)-[:TRADES]->(plum:Product {name: 'Plum'}), (ken)-[:TRADES]->(cabbage:Product {name: 'Cabbage'}), (ken)-[:TRADES]->(tomato:Product {name: 'Tomato'}), (ken)-[:TRADES]->(pineapple

How do I fix this Neo4j APOC query that creates nodes froma CSV file?

六眼飞鱼酱① 提交于 2019-12-11 05:28:46
问题 I want the query to read the CSV file and create a node for each row in the file. Here's the query: CALL apoc.load.csv('FILE:///C:/Temp/Test/Test/Neo4jTest/import/Neo4j_AttributeProvenance.csv',{sep:","}) YIELD map CALL apoc.create.node(map.NodeType, {key:map.NodeID}) yield node return count(*) Here's the error: Can't coerce `RootNode` to List<String> Here's the data file: NodeType,NodeID,SchemaName,TableName,AttributeName,DataType,PreviousNodeID RootNode,queryprocessingtest.q01

Add -f parameter when running Docker Toolbox

穿精又带淫゛_ 提交于 2019-12-11 05:25:02
问题 I would like to run a docker container using Docker Compose. The docker-compose up command works fine but I want to specify the location of the docker-compose.yml file. This is the command that is working. In this case the location of the docker-compose.yml file is C:\Users\USERNAME\docker-compose.yml "C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh" docker-compose up Now when I add the -f parameter, the Docker Toolbox just crashes. Say I want to put

Neo4j get pretty slower with high transaction concurrency

泄露秘密 提交于 2019-12-11 05:21:40
问题 I was using neo4j 3.1.0 enterprise edition. The main logical in my graph is: There are "IP" nodes and "User" nodes and both have "UNIQUE" constraints. Each time an user login, I add a relationship from IP to User. Here is my insert Cypher: MERGE (i:IP {ip:"1.2.3.4"}) MERGE (u:User {username:"xxx@gmail.com"}) MERGE (i) - [l:SUCC] -> (u) SET i:ExpireNode, i.expire={expire} SET u:ExpireNode, u.expire={expire} SET l.expire={expire}, l.login={login} The insert is pretty fast as the beginning. But

Neo4j Cypher - Creating relationship using two CSV files

六眼飞鱼酱① 提交于 2019-12-11 05:21:36
问题 I'm new to Neo4j and I'm currently working on to build a citation network. I have two CSV files one containing the node properties and other containing relationship properties. PAPERS.CSV - paperId, title, year 123, abc, 1900 234, cde, 1902 456, efg, 1904 CITES.CSV - fromId, ToId 123, 234 234, 456 My graph should look like (123)--cites-->(234)--cites-->(456) . Using these files how do I create a relationship between nodes? 回答1: You should avoid space in the header names and in the data too.

ModuleNotFoundError: No module named 'neo4j.addressing' and ModuleNotFoundError: No module named 'neo4j'

南楼画角 提交于 2019-12-11 05:17:38
问题 I am getting this error. just from trying to run Graph() method. >>> import py2neo >>> graph = py2neo.Graph() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "E:\Chibanggri\flask and neo4j\venv\lib\site-packages\py2neo\database.py", line 305, in __new__ database = Database(uri, **settings) File "E:\Chibanggri\flask and neo4j\venv\lib\site-packages\py2neo\database.py", line 85, in __new__ connection_data = get_connection_data(uri, **settings) File "E:\Chibanggri

Neo4j Spatial return only one node

醉酒当歌 提交于 2019-12-11 05:05:45
问题 I created a spatial index in neo4j but when searching for nearby places I only get one result. My query is: START n=node:geom('withinDistance:[63.36, 10.35, 50.0]') RETURN n And I have 3 nodes in the spatial index with this coords: Node 1 lat,lon: 63.3654, 10.3578 Node 2 lat,lon: 63.3654, 10.3577 Node 3 lat,lon: 63.3654, 10.3578 (same node 1) Theoretically the three nodes are in the same area. Any idea? UPDATE I performed these steps to use spatial (all executed from neo4j browser -> rest api

How to get result from Cypher Query in json using Neo4j C# Client

六月ゝ 毕业季﹏ 提交于 2019-12-11 05:04:10
问题 i am using Neo4j 2.0.3 DB and using C# client to access neodb. I could not find any way by which after querying db i can get results in the form of Json. Please give me some links or examples 回答1: You can get Cypher Query results in JSON format eg. Consider a graph with person nodes and nodes have property personId. The below query will give you result in the form of json object. MATCH (n:PERSON)-[:friend]->(friend:PERSON) RETURN {personId: n.personId, friends: collect(distinct friend