neo4j

Cypher query to find nodes that have 3 relationships

我只是一个虾纸丫 提交于 2019-12-20 02:17:09
问题 I figured out how to write this query when I am looking for 2 relationships, but not sure how to add more relationships to the query. Assume you have a book club database with 'reader' and 'book' as nodes. The 'book' nodes have a 'genre' attribute (to define that the book is a Fiction, Non-Fiction, Biography, Reference, etc.) There is a Relationship "HasRead" between 'reader' nodes and 'book' nodes where someone has read a particular book. If I want to find readers that have read both Fiction

Example of full-text search across multiple fields in Neo4j?

隐身守侯 提交于 2019-12-20 02:08:10
问题 I've seen some simple examples text searching STARTS WITH name such as: http://www.jexp.de/blog/html/full-text-and-spatial-search-in-neo4j-3.html https://blog.knoldus.com/2016/12/11/neo4j-with-scala-neo4j-vs-elasticsearch/ But I'm looking for something more along the lines of full-text search across multiple fields: title , content : https://www.digitalocean.com/community/tutorials/how-to-use-full-text-search-in-postgresql-on-ubuntu-16-04 Can I see an example of how this should be done with

Return overload fails

房东的猫 提交于 2019-12-20 02:01:11
问题 I'm following this little write up: https://github.com/Readify/Neo4jClient/wiki/cypher but I'm doing it from Powershell. so what I have so far is [System.Reflection.Assembly]::LoadFrom("C:\...\Newtonsoft.Json.6.0.3\lib\net40\NewtonSoft.Json.dll") [System.Reflection.Assembly]::LoadFrom("C:\...\Neo4jClient.1.0.0.662\lib\net40\Neo4jClient.dll") $neo = new-object Neo4jClient.GraphClient(new-object Uri("http://localhost:7474/db/data")) $q=$neo.Cypher.Match("n").Return({param($m) $m}); with which I

Return overload fails

北城以北 提交于 2019-12-20 02:01:06
问题 I'm following this little write up: https://github.com/Readify/Neo4jClient/wiki/cypher but I'm doing it from Powershell. so what I have so far is [System.Reflection.Assembly]::LoadFrom("C:\...\Newtonsoft.Json.6.0.3\lib\net40\NewtonSoft.Json.dll") [System.Reflection.Assembly]::LoadFrom("C:\...\Neo4jClient.1.0.0.662\lib\net40\Neo4jClient.dll") $neo = new-object Neo4jClient.GraphClient(new-object Uri("http://localhost:7474/db/data")) $q=$neo.Cypher.Match("n").Return({param($m) $m}); with which I

Spring Data Neo4j - repository.save and @Indexed(unique=true)

廉价感情. 提交于 2019-12-20 01:38:20
问题 Today I tried Spring Data Neo4j, I finally got it working somehow ... I'm using: Spring 4.0.2 Spring Data Neo4j 3.0.0 QueryDSL 3.3.1 Neo4j 2.0.1 Here's my config: @Configuration @EnableNeo4jRepositories(includeFilters=@Filter(value=GraphRepository.class, type=FilterType.ASSIGNABLE_TYPE)) public class Neo4jConfig extends Neo4jConfiguration { public Neo4jConfig() { setBasePackage("my.base.package"); } @Bean public GraphDatabaseService graphDatabaseService() { return new GraphDatabaseFactory()

SDN4 - Neo4j OGM + Jackson 2.0

半腔热情 提交于 2019-12-20 01:13:14
问题 I am trying to use Jackson 2.x annotations on a Spring Data Neo4j 4.0.0RC1 entity but am seeing failures in my application context starting. I have two @NodeEntities that implement an interface and I've annotated the interface as such: @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({ @Type(value = SimpleNode.class, name="simple"), @Type(value = OtherNode.class, name="other") }) public interface Node { } I believe this is correct

Neo4j: Unable to lock store

此生再无相见时 提交于 2019-12-19 22:02:34
问题 I'm using Neo4j graph DB and viewing the data on the browser. So whenever I run a code, i need to change database location field in neo4j-server.properties file. When i try to access DB with browser on I'm getting the following error: Exception in thread "main" java.lang.IllegalStateException: Unable to lock store [<DB path>], this is usually a result of some other Neo4j kernel running using the same store. Is it possible to view the database without locking the store? 回答1: There is another

Neo4j in Docker - Max Heap Size Causes Hard crash 137

柔情痞子 提交于 2019-12-19 21:22:24
问题 I'm trying to spin up a Neo4j 3.1 instance in a Docker container (through Docker-Compose), running on OSX (El Capitan). All is well, unless I try to increase the max-heap space available to Neo above the default of 512MB. According to the docs, this can be achieved by adding the environment variable NEO4J_dbms_memory_heap_maxSize , which then causes the server wrapper script to update the neo4j.conf file accordingly. I've checked and it is being updated as one would expect. The problem is,

Neo4j in Docker - Max Heap Size Causes Hard crash 137

痞子三分冷 提交于 2019-12-19 21:18:17
问题 I'm trying to spin up a Neo4j 3.1 instance in a Docker container (through Docker-Compose), running on OSX (El Capitan). All is well, unless I try to increase the max-heap space available to Neo above the default of 512MB. According to the docs, this can be achieved by adding the environment variable NEO4J_dbms_memory_heap_maxSize , which then causes the server wrapper script to update the neo4j.conf file accordingly. I've checked and it is being updated as one would expect. The problem is,

Cypher: Use WHERE clause or MATCH property definition for exact match?

你。 提交于 2019-12-19 19:43:18
问题 In Neo4j (version 3.0), the following queries return the same results: 1. MATCH (a:Label) WHERE a.property = "Something" RETURN a 2. MATCH (a:Label {property: "Something"}) RETURN a While playing with some large datasets, I noticed (and verified using EXPLAIN and PROFILE ) that for some instances, queries like the second one performs better and faster. While other instances exist where both versions performed equally, I didn't yet see one where the first version performed better. The neo4j