gremlin

TitanDB Index not changing state

风格不统一 提交于 2019-12-05 21:45:08
I wanted to drop an existing index and followed the steps in the documentation so far. I have no separate indexing backend configured for now. However, when I get to the step where you have to wait for the index status to change using m.awaitGraphIndexStatus it waits forever for the change and times out with the following error: GraphIndexStatusReport[success=false, indexName='usernameComposite', targetStatus=DISABLED, notConverged={username=INSTALLED}, converged={}, elapsed=PT1M0.092S] The very same happens when I try to create a new one. Any ideas what could cause this? I'm creating indizes

TITAN : Gremlin query returns inconsistent results on repeated execution

元气小坏坏 提交于 2019-12-05 19:41:01
I am running REXSTER/TITAN 0.4 over cassandra and uses gremlin for traversals. I ran below gremlin query in Rexster Doghouse Gremlin console. Vertex 92 was deleted earlier, since it was a duplicate vertex with same key ("eddy.com") But when I am querying, I am getting that vertex sometimes, and sometimes not . This is running in local dev machine, means no other threads or parallel task is running/updating this vertex in between. Am I missing any configuration/settings here? is this a bug? please help! gremlin> g.V('domain','eddy.com') ==>v[88] gremlin> g.V('domain','eddy.com') ==>v[88] ==>v

Gremlin-Server Add Vertex with Multiple Properties (Titan 1.0.0)

六眼飞鱼酱① 提交于 2019-12-05 15:34:54
I'm creating a Titan graph (backed by Dynamodb); I'm using Titan 1.0.0 and running Gremlin-Server 3 (on TinkerPop3). I'm trying to add a vertex to my graph with a label and multiple properties in a single line. I'm able to add a vertex with a label and a single property, and I can add multiple properties to a vertex after it has been created, but it seems that I can't do it all at once. For testing I'm running commands in the gremlin shell, but the end use case is interacting with it via REST api (which is already working fine). As a note, I'm rolling back after each of these transactions so I

Normal JSON to GraphSON format

守給你的承諾、 提交于 2019-12-05 11:58:28
I have two questions: Where I can actually find the basic format for a GraphSON file, that is guaranteed to be successfully loaded by the gremlin console? I'm trying to convert a JSON (with about 10-20 fields) to another file that can be queried by gremlin but I can't actually find any relevant information about the fields reserved by the graphson format or how I should handle the IDs etc. I exported the modern graph they provide and it's not even a valid JSON (Multiple JSON root elements), but a list of JSONs [1] I also saw fields like outE, inE...are these fields something I manually have to

How do I connect to a remote Neo4j database using gremlin python?

こ雲淡風輕ζ 提交于 2019-12-05 10:45:34
From what I've read Neo4j implements apache tinkerpop which leads me to think I can use gremlin python and rather than connect to a gremlin server I can point the python code at a neo4j server and treat it like a gremlin server. However I can't find any information online which shows how to do this so I'm thinking maybe I've misunderstood something. a) Can I use gremlin python directly with a neo4j db instance? b) If yes to (a) then how? Thanks Alex You can not connect gremlin-python to Neo4j Server. gremlin-python contains drivers that connect to Gremlin Server so you must have that installed

Add edge if not exist using gremlin

只愿长相守 提交于 2019-12-05 10:24:50
I'm using cosmos graph db in azure. Does anyone know if there is a way to add an edge between two vertex only if it doesn't exist (using gremlin graph query)? I can do that when adding a vertex, but not with edges. I took the code to do so from here : g.Inject(0).coalesce(__.V().has('id', 'idOne'), addV('User').property('id', 'idOne')) Thanks! It is possible to do with edges. The pattern is conceptually the same as vertices and centers around coalesce() . Using the "modern" TinkerPop toy graph to demonstrate: gremlin> g.V().has('person','name','vadas').as('v'). V().has('software','name',

gremlin from titan 1.0.0 is not running out of the box on windows

拈花ヽ惹草 提交于 2019-12-05 08:51:27
I'm following the http://s3.thinkaurelius.com/docs/titan/1.0.0/getting-started.html guide on my windows machine. but i'm getting stuck at the very first step, getting gremlin to run: >bin\gremlin.bat Error opening zip file or JAR manifest missing : ..\lib\jamm-0.3.0.jar Error occurred during initialization of VM agent library failed to init: instrument joey baruch Found a solution in this google group for this issue and more: to run gremlin edit the gremlin.bat file: Change: set LIBDIR=..\lib To: set LIBDIR=lib Change: if "%CP%" == "" ( set CP=%LIBDIR%\%1 )else ( set CP=%CP%;%LIBDIR%\%1 ) To:

How to get friends of friends that have the same interest?

一世执手 提交于 2019-12-05 07:21:32
问题 Getting friends of friend are pretty easy, I got this which seems to work great. g.v(1).in('FRIEND').in('FRIEND').filter{it != g.v(1)} But what I want to do is only get friends of friends that have the same interests. Below I want Joe to be suggested Moe but not Noe because they do not have the same interest. 回答1: You simply need to extend your gremlin traversal to go over the LIKES edges too: g.v(1).in('FRIEND').in('FRIEND').filter{it != g.v(1)}.dedup() \ as('friend').in('LIKES').out('LIKES'

How Gremlin query same sql like for search feature

做~自己de王妃 提交于 2019-12-04 20:10:18
问题 Im using OrientDB type graph. I need syntax of Gremlin for search same SQL LIKE operator LIKE 'search%' or LIKE '%search%' I've check with has and filter (in http://gremlindocs.com/). However it's must determine exact value is passed with type property. I think this is incorrect with logic of search. Thanks for anything. 回答1: Try: g.V().filter({ it.getProperty("foo").startsWith("search") }) or g.V().filter({ it.getProperty("foo").contains("search") }) 回答2: You can use filter with a bit of

How to get a subgraph consisting of all vertices, that satisfy specific condition

蓝咒 提交于 2019-12-04 16:53:49
The Document and the Revision are two objects that reside in our domain logic specific layer. The Document represents an abstraction around any material piece of paper that you could think of. That is - every contract, invoice or drawing could be called a Document . On the other hand, the material representation of the Document is the Revision : the list of paper, that construction engineer receives on site, represents a Revision of the Document that designer has created. If something in a drawing has to be changed, due to an error or changed requirements, then a new revision will show up on