neo4j

is it possible to add new function to cypher?

大城市里の小女人 提交于 2019-12-11 02:35:01
问题 it would be appreciated to if anyone can answer that is there any way to add an LOOP function to cypher? i can find loops in graph by use of traversal. but i want to know is there anyway to pass obtained result to a customized user defined Cypher function? 回答1: Not yet. They're talking about UDFs (User Defined Functions) in an upcoming release of Neo4j, though. You might consider refining your use case and asking for it as a feature of Cypher itself in github issues, as well. 回答2: Until UDFs

Neo4j cypher query for X-chromosome ancestors

时光毁灭记忆、已成空白 提交于 2019-12-11 02:32:14
问题 In genetic genealogy X-chromosome data is useful linking to certain ancestors. This is well illustrated at: X-DNA Inheritance Chart My Neo4j database has nodes for each Person and relationships connecting them of father and mother. Each node has a property sex (for the Person's gender; M or F). A female has two X-chromosomes, one from either parent. A male has one X-chromosome, always from the mother. You can use reduce to see the genders involved in the inheritance from ancestors: match p=(n

Use neo4j server instead of embedded mode

天涯浪子 提交于 2019-12-11 02:32:01
问题 I'm working on a webapp running on Tomcat which using spring-data to connect to a neo4j graph in embedded mode. I would like to use neo4j server instead of the embedded mode and I am looking for some help to be sure about how to do that. Some of my application services are quite difficult and combine, in a single transaction, the result of several cypher requests in a dto sent back to the user. First I thought that I have to create a server unmanaged extension and I think I should follow

Match/delete whole subgraph in Neo4j

馋奶兔 提交于 2019-12-11 02:28:43
问题 Given there is a big graph in my database and I want to delete a whole subgraph of that, where I only know the starting node of this subgraph. Is it possible to write a cypher query to match and delete this whole subgraph? Caveat: I don't know more of the subgraph as in which node it starts. 回答1: Yes, you can expand from a single node to all subgraph nodes via APOC Procedures path expander, optionally with filters on the relationships or nodes to traverse, and with an optional max depth. You

java neo4j check if a relationship exist

点点圈 提交于 2019-12-11 02:27:40
问题 excluse if this is a duplicate, although I did not find the answer so far. I have an application that creates nodes and relationships via cypher statement against the REST-API. I create relationships with the below code: public URI createRelationship(GraphNodeTypes sourceType, URI sourceNode, GraphNodeTypes targetType, URI targetNode, GraphRelationshipTypes relationshipType, String[] jsonAttributes) { URI relationShipLocation = null; String cypherArt = getNodeIdFromLocation(sourceNode)+"-[:"

debugging an unmanaged Neo4j extension

元气小坏坏 提交于 2019-12-11 02:24:57
问题 I just started developing an unmanaged extension for Neo4j server using the Graphaware framework. Everything is fine so far. Even unit tests are working. But I would like to actually debug the extension running the Neo4j server from within Intellij. Can anybody give me a hint on how to do that? Many thanks in advance, Oliver PS: This extension is being called via rest interface from a separate web server providing hosting the actual web application. 回答1: You need to enable jvm remote

Is there a way to shard and replicate neo4j data?

这一生的挚爱 提交于 2019-12-11 02:23:12
问题 I am considering the option of neo4j for some of the new projects I am working for. For the given data needs (inherently graph based) neo4j fits well and a quick prototype is giving good response time for me. What I want to understand is how to scale a neo4j deployment. Specifically: How do I shard my data across neo4j deployments. Since neo4j is deployed on a single machine, there is a limit to how much data I can store in a single machine and hence I would like to know how to distribute it.

Why does Spring Data Neo4j create an underscore prefixed label on nodes?

匆匆过客 提交于 2019-12-11 02:18:46
问题 I realize that a similar question was asked here, but I'm trying to understand the reasoning behind the approach of SDN to create a label matching my class name, and also creating the same label prefixed by an underscore. So, for example, I have a Patient class. When I create my @NodeEntity decorated Patient class through my Neo4j repository and then query it back through the Neo4j web console, I see Patient and _Patient as the labels. As an extension to this question, say I have the

Neo4j one-to-many fetch data

与世无争的帅哥 提交于 2019-12-11 02:15:22
问题 In my Spring Boot/Neo4j application I have a following entities: @NodeEntity public class User extends BaseEntity { private static final String HAS = "HAS"; @GraphId private Long id; private String username; private String password; private String email; private String firstName; private String lastName; @RelatedTo(type = HAS, direction = Direction.OUTGOING) private Set<Role> roles = new HashSet<Role>(); .... } @NodeEntity public class Vote extends BaseEntity { private static final String

alternative relationship deprecated warning

我与影子孤独终老i 提交于 2019-12-11 02:08:49
问题 Cypher query: MATCH (x) WHERE x.uuid = "41f64ab1-6009-4e95-b22b-c833525f6edb" MATCH p = (o)-[:CONTAINS|:HAVING*]->(x) WHERE labels(o) IN ['Box', 'Package'] RETURN p Running it in Neo4j browser results in a warning: **WARNING: This feature is deprecated and will be removed in future versions.** The semantics of using colon in the separation of alternative relationship types in conjunction with the use of variable binding, inlined property predicates, or variable length will change in a future