neo4j

Write or token create operations are not allowed in procedure using cypher projection

一个人想着一个人 提交于 2019-12-24 04:19:24
问题 When calling a procedure using an evaluated inner query (cypher projection)which would be creating an node or edge a forbidden error is thrown for the admin user. It is possible to run the query outside the procedure. Maybe it is something of an configuration issue? I am trying to run a query using the timetree procedure of GraphAware and the LabelPropagation of Neo4j. But I've been able to get the forbidden error using a much simpler query. I am using Neo4j Desktop. I have tried giving the

Cypher - matching two different possible paths and return both

白昼怎懂夜的黑 提交于 2019-12-24 04:18:38
问题 I have a a data set that I have represented here as an example: http://console.neo4j.org/?id=3dq78v What I am trying to do is for every Z node in my graph (the example only has one but I have many) I want to capture a set of properties that cover all all of the associated A, B, C and D nodes and relationships. I have come across two issues trying to do this. The first is that the C nodes are either connected to the to the B nodes OR the A nodes. Second the D nodes are connected to C nodes but

Cycles in Gremlin/Cypher

99封情书 提交于 2019-12-24 04:07:09
问题 I'm making a presentation about how some elements looks in Neo4j's Cypher and Titan's Gremlin i.e. add new vertex, look for relation etc. I have a problem with looking for cyclec. Is there any function in these 2 languages which can return a cycles i.e. for given vertex? 回答1: Here's how you do it in Gremlin: gremlin> g = TinkerGraphFactory.createTinkerGraph() ==>tinkergraph[vertices:6 edges:6] gremlin> g.v(2).addEdge("knows", g.v(6)) ==>e[0][2-knows->6] gremlin> g.v(6).addEdge("knows", g.v(1)

Neo4j CQL -(1)- CREATE命令

a 夏天 提交于 2019-12-24 04:03:02
Neo4j “CREATE”命令 创建没有属性的节点 使用属性创建节点 在没有属性的节点之间创建关系 使用属性创建节点之间的关系 为节点或关系创建单个或多个标签 我们将讨论如何创建一个没有属性的节点: Neo4j CQL“CREATE”命令用于创建没有属性的节点。 它只是创建一个没有任何数据的节点。 CREATE命令语法 CREATE (:) 语法说明: 它是一个Neo4j CQL命令。 它是我们要创建的节点名称。 它是一个节点标签名称 注意事项 - 1、Neo4j数据库服务器使用此将此节点详细信息存储在Database.As中作为Neo4j DBA或Developer,我们不能使用它来访问节点详细信息。 2、Neo4j数据库服务器创建一个作为内部节点名称的别名。作为Neo4j DBA或Developer,我们应该使用此标签名称来访问节点详细信息。 例如:本示例演示如何创建一个简单的“Employee”节点。 按照以下步骤: 步骤1 - 打开Neo4j数据浏览器 步骤2 - 在数据浏览器中的美元提示符下键入以下命令。 CREATE (emp:Employee) 这里emp是一个节点名 Employee是emp节点的标签名称 它显示在Neo4j数据库中创建一个标签和一个节点。 它在数据库中创建一个带有标签名“Employee”的节点“emp”。 本示例演示如何创建一个简单的“Dept

py2neo - How can I use merge_one function along with multiple attributes for my node?

若如初见. 提交于 2019-12-24 03:53:10
问题 I have overcome the problem of avoiding the creation of duplicate nodes on my DB with the use of merge_one functions which works like that: t=graph.merge_one("User","ID","someID") which creates the node with unique ID. My problem is that I can't find a way to add multiple attributes/properties to my node along with the ID which is added automatically (date for example). I have managed to achieve this the old "duplicate" way but it doesn't work now since merge_one can't accept more arguments!

py2neo - How can I use merge_one function along with multiple attributes for my node?

柔情痞子 提交于 2019-12-24 03:53:01
问题 I have overcome the problem of avoiding the creation of duplicate nodes on my DB with the use of merge_one functions which works like that: t=graph.merge_one("User","ID","someID") which creates the node with unique ID. My problem is that I can't find a way to add multiple attributes/properties to my node along with the ID which is added automatically (date for example). I have managed to achieve this the old "duplicate" way but it doesn't work now since merge_one can't accept more arguments!

SDN 4 : How to cause SDN 4 to use MERGE rather than CREATE

試著忘記壹切 提交于 2019-12-24 03:50:07
问题 Prior to migrating my project to SDN 4, I used my own custom REST client code which generated Cypher statements of the form: MERGE (n:LABEL1:LABEL2 {prop1:"val"...}) ON CREATE SET ... ON MATCH SET ... This had the desired effect of creating nodes which needed to be created, and updating existing nodes where necessary. However, using .save(...) on the SDN 4 Neo4jTemplate, only CREATE Cypher statements appear to be generated, resulting in duplicate nodes, where what is desired is new nodes are

Case insensitive regex for non-ASCII strings does not work?

人走茶凉 提交于 2019-12-24 03:47:06
问题 With Neo4j 2.1.0-M01, I just discovered that case insensitive regex match does not work with Ukrainian words, at list from web-interface browser. Say I have node with a word 'Ліга' somewhere. MATCH (n) WHERE n.payload =~ '(?i).*ліга.*' does not match MATCH (n) WHERE n.payload =~ '(?i).*лІГа.*' does not match MATCH (n) WHERE n.payload =~ '(?i).*Ліга.*' match Ok Do I need some deep magic to get it working as expected? Thanks in advance! WBR, Andrii 回答1: Not 100% sure, but could you please check

Most efficient way to get all connected nodes in neo4j

99封情书 提交于 2019-12-24 03:37:18
问题 The answer to this question shows how to get a list of all nodes connected to a particular node via a path of known relationship types. As a follow up to that question, I'm trying to determine if traversing the graph like this is the most efficient way to get all nodes connected to a particular node via any path. My scenario: I have a tree of groups (group can have any number of children). This I model with IS_PARENT_OF relationships. Groups can also relate to any other groups via a special

Correct way to create json from neo4j rest API

十年热恋 提交于 2019-12-24 03:27:46
问题 I want to create the following json "model":[ { "_id": 123, "innerMode1": [ { "_id": 233, "_type": "somtype2", "innerMode2": [ { "_id": 24533, "_type": "somtype3", "innerMode2": [ { ....this goes on till depth of 6 } ] } ] } ], "_id": 45123, "innerMode2": [ { "_id": 23433, "_type": "somtype2", "innerMode2": [ { "_id": 241233, "_type": "somtype3", "innerMode2": [ { ....this goes on till depth of 6 } ] } ] } ] . . . . . 1000 records cypher something like: MATCH (c:Capability{SectorID: