tinkerpop3

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

Re-running an existing route in a Tinkerpop Graph

不羁的心 提交于 2020-04-18 05:47:23
问题 If i have a pre-run route from the shortestPath which is returned as a list of vertex, how can i then re-run that on a graph with the same set of vertices, to return the edges which it has used. i.e. PATH = (V(1), V(2), V(3), V(4), V(5), V(6)), how would the command look to replay that path on a new graph with the same vertices, returning the edges, which contain different properties. So to confirm i need to input this explicit Path to return the edges? 回答1: If I knew my path was [v[1],v[4],v

Best way to get (millions of rows of) data into Janusgraph via Tinkerpop, with a specific model

核能气质少年 提交于 2020-03-22 09:20:10
问题 Just started out with Tinkerpop and Janusgraph, and I'm trying to figure this out based on the documentation. I have three datasets, each containing about 20 milions rows (csv files) There is a specific model in which the variables and rows need to be connected, e.g. what are vertices, what are labels, what are edges, etc. After having everything in a graph, I'd like to of course use some basic Gremlin to see how well the model works. But first I need a way to get the data into Janusgraph.

Titan gremlin console and java returns different result for group().by() query

♀尐吖头ヾ 提交于 2020-01-24 20:48:22
问题 I am using Titan 1.0.0 supported by cassandra 2.1.7 as backend storage. While trying to execute the same query on gremlin console and java program, I am getting 2 the output in two different formats. I am using the gremlin console provided by titan-1.0.0-hadoop1 and for java I am using TinkerPop Gremlin 3.0.1-incubating. Gremlin Console: gremlin> g.V().has('msid',within(-2128958273, 2147477890)).as('in').local(outE('hie_child').has('hostid_e',within(153,83)).order().by('hrank',incr).limit(5))

Why does Gremlin JavaScript use “from_” mapping instead of “from”?

岁酱吖の 提交于 2020-01-11 07:20:09
问题 I struggled with this for hours before finding out that you have to use from_ instead of from when using gremlin javascript. After digging through the source code I finally found out that the code is using from_ instead of from (see code). Since I'm a newbie this comes off as strange because its counterpart to is still to (and not to_ , see code here) I googled everywhere but couldn't find the reason why this works this way, and feel uneasy about using the underscore version since most of the

Following GRAPHSON format not working

巧了我就是萌 提交于 2020-01-07 08:47:22
问题 I Am trying to convert the following graphSon Format into a graph instance using the follwing command graph.io(IoCore.graphson()).reader().create().readGraph(stream, graph); But while running converting the GRaphSON into graph instance given below {"id":0, "label":"buyer", "outE": {"email_is": [{"id":0,"inV":1, "properties":{"weight":1} } ]} ,"properties": {"buyer": [{ "id":0,"value":"buyer0" }] ,"age": [{ "id":1,"value":10}] }} {"id":1, "label":"email", "inE": { "email_is": [{"id":1,"outV":0

Titan 1.0[Berkeley+ES] - Delayed update of ES index

末鹿安然 提交于 2020-01-06 04:15:27
问题 Titan 1.0 [Berkeley+ Remote Elastic Search] we are using this combination of Titan. Following is the properties file - storage.backend=berkeleyje storage.directory=D:/other-projects/graph-db/titan/enron-tk3/db/berkeley index.search.backend=elasticsearch index.search.index-name=akshayatitan index.search.hostname=localhost index.search.elasticsearch.client-only=true index.search.elasticsearch.local-mode=false We are only using Mixed Index. Now we add a node with few properties through Java code

How to Find Vertices of Specific class with Tinkerpop Frames

让人想犯罪 __ 提交于 2020-01-05 23:08:03
问题 I have a FramedGraph object with Vertices of different classes, for instance Person and Location. I would like to retrieve all vertices of the "Person" class. Here is my current method. public List<Person> listPeople() { List<Person> people = new ArrayList<Person>(); Iterator iterator = g.getVertices().iterator(); while (iterator.hasNext()) { Vertex v = (Vertex) iterator.next(); Person p = (Person) g.getVertex(v.getId(), Person.class); people.add(p); } return people; } This feels terrifically

How to Find Vertices of Specific class with Tinkerpop Frames

北城余情 提交于 2020-01-05 23:03:07
问题 I have a FramedGraph object with Vertices of different classes, for instance Person and Location. I would like to retrieve all vertices of the "Person" class. Here is my current method. public List<Person> listPeople() { List<Person> people = new ArrayList<Person>(); Iterator iterator = g.getVertices().iterator(); while (iterator.hasNext()) { Vertex v = (Vertex) iterator.next(); Person p = (Person) g.getVertex(v.getId(), Person.class); people.add(p); } return people; } This feels terrifically

Gremlin-Server Cassandra

喜夏-厌秋 提交于 2019-12-23 17:22:04
问题 I am starting to work with Titan and I am using cassandra as backend store. When I start titan.sh cassandra and elasticsearch were started but the gremlin server did not. I was looking at titan.sh and I have seen that it start gremlin server with conf/gremlin-server/gremlin-server.yaml. The problem is that the gremlin-server.yaml is configured as this: graphs: { graph: conf/gremlin-server/titan-berkeleyje-server.properties} Using BerkeleyDb. I have not seen the cassandra.yaml for Gremlin