janusgraph

Displaying sub-levels in gremlin query

那年仲夏 提交于 2020-06-28 04:11:08
问题 I have the graph as shown in the figure below. The numbers represent the level format of the node which is required as output from the gremlin query along with the properties of the nodes. The graph structure can change that is more nodes can be added to the graph. The level must be returned in a similar format for additional nodes. For example, children of 1.1.1 should return the level as 1.1.1.1,1.1.1.2 ... The following query but the level is in continuous format 1,2,3 ... g.withSack(0). V

'Or' operator for node properties in Gremlin assigned to one subgraph

半腔热情 提交于 2020-06-16 19:26:06
问题 I have a Janusgraph database which contains nodes with the label 'Paper', the node properties 'paperTitle' and 'year' and the edge type 'References'. I'm trying to write a query that will allow me to select two papers by title and all their references and assign that result to a subgraph. I can select one paper using two conditions like this: sg = g.V(). and(has('Paper', 'paperTitle', 'ladle pouring guide'), has('Paper', 'year', '1950')). inE('References'). subgraph('sg1'). cap('sg1'). next()

'Or' operator for node properties in Gremlin assigned to one subgraph

纵饮孤独 提交于 2020-06-16 19:23:19
问题 I have a Janusgraph database which contains nodes with the label 'Paper', the node properties 'paperTitle' and 'year' and the edge type 'References'. I'm trying to write a query that will allow me to select two papers by title and all their references and assign that result to a subgraph. I can select one paper using two conditions like this: sg = g.V(). and(has('Paper', 'paperTitle', 'ladle pouring guide'), has('Paper', 'year', '1950')). inE('References'). subgraph('sg1'). cap('sg1'). next()

'Or' operator for node properties in Gremlin assigned to one subgraph

一笑奈何 提交于 2020-06-16 19:22:16
问题 I have a Janusgraph database which contains nodes with the label 'Paper', the node properties 'paperTitle' and 'year' and the edge type 'References'. I'm trying to write a query that will allow me to select two papers by title and all their references and assign that result to a subgraph. I can select one paper using two conditions like this: sg = g.V(). and(has('Paper', 'paperTitle', 'ladle pouring guide'), has('Paper', 'year', '1950')). inE('References'). subgraph('sg1'). cap('sg1'). next()

Update action [REINDEX] cannot be invoked for index with status [INSTALLED]

让人想犯罪 __ 提交于 2020-05-26 08:04:06
问题 I am following this blog: https://developer.ibm.com/dwblog/2018/janusgraph-composite-mixed-indexes-traversals/ code : gremlin> graph.tx().rollback() ==>null gremlin> mgmt = graph.openManagement() ==>org.janusgraph.graphdb.database.management.ManagementSystem@19472803 gremlin> code = mgmt.getPropertyKey('code') ==>code gremlin> mgmt.buildIndex('byCodeComposite', Vertex.class).addKey(code).buildCompositeIndex() ==>byCodeComposite gremlin> mgmt.commit() ==>null gremlin> mgmt

No such property: ToInputStream for class: Script4

。_饼干妹妹 提交于 2020-05-17 08:54:07
问题 I have a situation where I want to import my graph data to database.I am having janusgraph(latest version) running with cassandra(version 3) and elasticsearch(version 6.6.0) using Docker.I have been suggested to use gryo format.So I have tried this command graph.io(IoCore.gryo()).reader().create().readGraph(ToInputStream.from("my_graph.kryo"), graph); but ended up with an error No such property: ToInputStream for class: Script4 The documentation I am following is here.Please take a look and

No such property: ToInputStream for class: Script4

天涯浪子 提交于 2020-05-09 06:58:05
问题 I have a situation where I want to import my graph data to database.I am having janusgraph(latest version) running with cassandra(version 3) and elasticsearch(version 6.6.0) using Docker.I have been suggested to use gryo format.So I have tried this command graph.io(IoCore.gryo()).reader().create().readGraph(ToInputStream.from("my_graph.kryo"), graph); but ended up with an error No such property: ToInputStream for class: Script4 The documentation I am following is here.Please take a look and

JanusGraph .net C#

前提是你 提交于 2020-05-09 05:32:32
问题 Hey Can anyone help me figure out how I can connect to remote JanusGraph server hosting several graphs and query a specific graph (by graph name) using C# JanusGraph.net ? I can connect to the server but I can't query a specific graph. var c = JanusGraph.Net.JanusGraphClientBuilder.BuildClientForServer(server).Create(); var connection = new DriverRemoteConnection(c); var g = Traversal().WithRemote(connection); How we can implement ConfiguredGraphFactory.create("graphName") or

Janusgraph using Gremlin query in .net core 3.0

孤者浪人 提交于 2020-04-29 03:28:46
问题 We currently use gremlin.net library in a net core 3.0 application to connect to Janusgraph db. We need to execute below query in janusgraph g.V('12345').outE('myedge').has('datetime',lt(1581922847)).order().by('datetime', incr).limit(100).valueMap().as('time').inV().as('user').select('time','user') The query runs fine as long as we dont have inV() part. If we have inV() , we are facing below error, ScriptEvaluationError: java.util.LinkedHashMap cannot be cast to org.apache.tinkerpop.gremlin

Janusgraph using Gremlin query in .net core 3.0

懵懂的女人 提交于 2020-04-29 03:28:17
问题 We currently use gremlin.net library in a net core 3.0 application to connect to Janusgraph db. We need to execute below query in janusgraph g.V('12345').outE('myedge').has('datetime',lt(1581922847)).order().by('datetime', incr).limit(100).valueMap().as('time').inV().as('user').select('time','user') The query runs fine as long as we dont have inV() part. If we have inV() , we are facing below error, ScriptEvaluationError: java.util.LinkedHashMap cannot be cast to org.apache.tinkerpop.gremlin