tinkerpop

Import package in gremlin

浪子不回头ぞ 提交于 2019-12-25 08:32:09
问题 I am trying to import "https://github.com/thinkaurelius/titan/blob/1.0.0/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/tinkerpop/io/graphson/TitanGraphSONModule.java" in gremlin by using command as import https://github.com/thinkaurelius/titan/blob/1.0.0/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/tinkerpop/io/graphson/TitanGraphSONModule.java; But getting error like this: Invalid import definition: 'https://github.com/thinkaurelius/titan/blob/1.0.0/titan-core/src/main

Why simple set and then get on Dynamic Proxy does not persist? (using TinkerPop Frames JavaHandler)

醉酒当歌 提交于 2019-12-25 05:27:19
问题 I wanted to add simple getters and setters on a class that implements VertexFrame and I used JavaHandlers for those. For those methods I didn't want to have any interaction with the database. Unfortunately there is not something like @Ignore so I don't have unexpected annotation exceptions. When I set something on the proxy and immediately I do a get after it goes through reflection, nothing is stored. Could be that I shouldn't be using JavaHandlers but something else.. Btw manager.frame

Gremlin use case - Int properties and coalesce()

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 23:16:42
问题 Can vertex properties stored as integers be incremented and decremented? If so, how? For a fixed dataset, does coalesce() always return the same item? Is it possible to randomise it or any other way to do it? For instance of all the incoming vertices, choose a random one every time even if the dataset itself is not changed. 回答1: Can vertex properties stored as integers be incremented and decremented? You can use sack() : gremlin> g = TinkerFactory.createModern().traversal() ==

Issue with creating edge in OrientDb with Blueprints / Tinkerpop

馋奶兔 提交于 2019-12-24 11:34:11
问题 I am recently trying to learn OrientDb and now that I am somewhat familiar with the OrientDb console itself I am moving on to using Blueprints to write a simple java program to create a graph. I am trying to create a few vertices and edges between them, but although my vertices are created successfully, I am unable to see my edges unless I call the method for creation twice. If I comment out one of the calls, none of the edges are being created. I tried checking for any timing issues by

Connecting gremlin CLI to a remote tinkerpop gremlin-server

只谈情不闲聊 提交于 2019-12-24 08:17:27
问题 Using gremlin-javascript , I'm connecting to a remote server using: const gremlin = require('gremlin') const Graph = gremlin.structure.Graph const DriverRemoteConnection = gremlin.driver.DriverRemoteConnection const graph = new Graph() const g = graph .traversal() .withRemote(new DriverRemoteConnection('ws://localhost:8182/gremlin')) From the gremlin CLI, I can setup a TinkerGraph using gremlin> graph = TinkerGraph.open() gremlin> g = graph.traversal() However, I'd like to connect to my Graph

Orientdb: Create new Graph database

帅比萌擦擦* 提交于 2019-12-23 12:55:31
问题 I'm trying to create a new instance of OrientGraph database, as follows: OrientGraph graph = new OrientGraph("local:C:/temp/graph/db"); graph.create(); //BUT no create method!! anyhow, while sticking with the manual and do it with ODatabaseDocumentTx like: db = new ODatabaseDocumentTx("plocal:c:/orientdb/db"); db.create(); .... db.shutdown(); then I want to get a session like: OrientGraphFactory factory = new OrientGraphFactory("plocal:c:/orientdb/db", "admin", "admin"); OrientGraphNoTx g =

Limiting depth of shortest path query using Gremlin on JanusGraph

谁说胖子不能爱 提交于 2019-12-23 00:25:18
问题 I have a fairly large graph (currently 3806702 vertices and 7774654 edges, all edges with the same label) in JanusGraph. I am interested in shortest path searches in it. Gremlin recipes mention this query: g.V(startId).until(hasId(targetId)).repeat(out().simplePath()).path().limit(1) This returns path that I know to be a correct one immediately but then hangs the console ( top shows janusgraph and scylla to be processing stuff furiously though, so I guess it's working in the background, but

Neo4j Multi-tenancy

左心房为你撑大大i 提交于 2019-12-22 05:03:15
问题 What is the best way to achieve multi-tenancy in neo4j? I have seen Tinkerpop and Spring Data. I'm have multiple clients and I would like to store client info in its own database to ensure security. I do not want to use labels or indexes to solve this problem. 回答1: You mention that you've "seen TinkerPop" but I couldn't tell if that meant you've seen it, considered it and dismissed it as a solution here, so apologies if that is the case and I'm not answering your question. I've successfully

possible to connect to multiple neo4j databases via bulbs/Rexster?

大兔子大兔子 提交于 2019-12-21 21:23:51
问题 I would like to be able to specify the neo4j (2.0+) database folder when I open a connection to a graph using bulbs. The goal is to be able to open different or multiple neo4j databases (folders in data/) on the same machine without starting the neo4j server. This works with the Gremlin console. I suspect the route to doing this with bulbs would be to use the bulbs Rexster client (http://bulbflow.com/docs/api/bulbs/rexster/client/) and somehow automatically start a Rexster server pointing to

How to get id and all properties from a vertex in gremlin?

▼魔方 西西 提交于 2019-12-21 20:44:21
问题 I am using AWS Neptune with gremlin and I want to get the id of a vertex with all properties of the vertex in one query. How can I do this? I have tried g.V().hasLabel('file').valueMap(true) but the output is: { "fileSize": [ "9170" ], "Gremlin.Net.Process.Traversal.T": "f1fce58306f85ca7050503160640d735c9919c8fc85881d65de80bfe31b5ca24", "mimeType": [ "text/html" ] } No label and no id is there. The problem with project('id','label',' fileSize', 'mimeType', 'malwareSource'). by(id). by(label).