neo4j

Convert multiple relationships between 2 nodes to a single one with weight

淺唱寂寞╮ 提交于 2019-12-11 23:24:12
问题 I have the following graph, describing co-occurrence of car brands in documents: CREATE (`0` :Car {value:"Ford"}) , (`1` :Car {value:"Subaru"}) , (`2` :Car {value:"VW"}) , (`0`)-[:`DOCUMENT` {value:"DOC-1"}]->(`1`) , (`0`)-[:`DOCUMENT` {value:"DOC-2"}]->(`1`) , (`1`)-[:`DOCUMENT` {value:"DOC-3"}]->(`2`); If there are many relationships between two nodes - for the purpose of visualization - I want to replace it with a single one and calculate the weight: VW ---1--- Subaru ---2--- Ford How can

Connect docker-compose files by shared network

北城余情 提交于 2019-12-11 23:19:38
问题 I have separate docker-compose files with common configurations and application configurations. I want to connect containers defined in both docker-compose files by the common network which is defined in docker-compose.yml with the application's images. I need this to connect to the database on the container host. How can I define the same network in another docker-compose-producer file or can? My common docker-compose.yml looks like this: version: '3.3' services: kafka: image: spotify/kafka

queryContext - filtering with numbers neo4j/lucene

試著忘記壹切 提交于 2019-12-11 23:16:59
问题 I'm trying to filter a wildcard query in neo/lucene using numeric range. I want to search for all nodes (documents) having key "actor" starting with "rob" and age > 20: WildcardQuery luceneQuery = new WildcardQuery( new Term("actor", "rob*" )); QueryContext qx = new QueryContext(luceneQuery) .numericRange("age", 20, null) .sortNumeric("age", true); IndexHits<Node> hits = lucene.query(qx); Once I add numeric range the wildCard query does not works, it only orders by numeric range. Is it

Spring Data Neo4j Create duplicate nodes with underscore

。_饼干妹妹 提交于 2019-12-11 22:32:53
问题 When i am persisting nodes in database using spring data neo4j. it persist duplicate nodes like "person" and "_person". it both contains same data. so i want to stop this behaviour of sdn. I am not using any inheritance and simply each class is having all properties. Also if i insert data from neo4j server directly ,sdn is not getting it. 回答1: The nodes are not being duplicated (you should see the same node ID on tour example person and _person). What you are seeing is the type representation

I can't see the JFrame components until the end of dataset mapping. Why?

随声附和 提交于 2019-12-11 22:30:27
问题 I have developed a piece of software that creates an Ontology using neo4j. Once the ontology is built, I start mapping the dataset of 2 million rows to it, which takes more or less 20 minutes to be completed. As a result, I wished to add a JFrame that shows the process execution. The code below creates at the beginning the JFrame and then it starts mapping the dataset. However, I can see during the execution the JFrame, but its components appears inside the JFrame after the mapping finishes.

Cypher query with infinite relationship takes forever

﹥>﹥吖頭↗ 提交于 2019-12-11 22:12:39
问题 I'm trying to implement a simple graph db for NYC subway. There are a total of 493 stops with a label :STOP and a property {name:" stop name "}, eg: (n:STOP {name:"Van Cortlandt Park - 242 St"}) -[:DIRECT {dist:0.5}]-> (m:STOP {name:"238 St"}) with a total of 566 relationships [:DIRECT {dist: ...} ] What I'm trying to get is a list of nodes and sum(dist) between them starting from a particular stop and return only the ones with a certain sum(dist) away, the cypher query runs perfectly when I

Grails Neo4j - why is POM included as dependency?

六眼飞鱼酱① 提交于 2019-12-11 20:46:32
问题 I'm using spring-data-neo4j and Grails. I get the following error when executing "grails test-app". I have the following BuildConfig.groovy dependency section: dependencies { // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g. // runtime 'mysql:mysql-connector-java:5.1.29' // runtime 'org.postgresql:postgresql:9.3-1101-jdbc41' test "org.grails:grails-datastore-test-support:jar:1.0-grails-2.4" compile "org.springframework:spring-context:jar

Neo4j query for modeling transitive clousure

一笑奈何 提交于 2019-12-11 20:25:26
问题 I am exploring GraphDB query languages, and asked a question about transitive closure support in OriendDB here? I would like to see how Neo4J supports this feature: Briefly, suppose I have Nodes all labeled as PERSON. And I have Edges called "father" connecting these persons together. For a given node say p1, I am wondering how the following query looks like in Neo4j: find all the ancestors of p1? I am not familiar with Neo4j syntax (but I think it is possible to define such an structure I

“Resultset too large (over 1000 rows)” in neo4j browser

[亡魂溺海] 提交于 2019-12-11 20:00:44
问题 I'm using neo4j 2.1.2 community edition. I have loaded the CSV file which is having 2500 rows and i have created nodes and relationships among the columns. When i run the below cypher query match (n) return count(*); I'll get the nodes count as 17275 . So when i match the nodes like match (n) return n and try to get the corresponding graph in a neo4j browser, it says Resultset too large (over 1000 rows) I know it's due to the nodes requested is more than 1000. So if i want to see the complete

Copy neo4j database from another pc

南笙酒味 提交于 2019-12-11 20:00:43
问题 I did it this way OVERWRITE DIRECTORY NE04J IN ORIGINAL DOCUMENTS WITH THE EMPTY JOIN FOR XP USERNAME / APPLICATION DATA / Neo4j COMMUNITY OR 7 "C: \ Users \ Tuo_Utente \ AppData \ Roaming \ Neo4j COMMUNITY"  COPY THE FOLDER FROM THE ORIGINAL SYSTEM to NEW TO JOIN PROGRAMS X86 / NE04J Commuity  COPY THE FOLDER FROM THE ORIGINAL SYSTEM to NEW I get everything but the web-admin, I have not the various style. how do I import too? image http://i.imgur.com/xdgh9Bv.png?1 I have different style