gremlin

Unable to install gremlin-neo4j through gremlin shell

血红的双手。 提交于 2019-12-11 12:28:19
问题 So, I'm going through the tutorial on getting started with the TinkerPop 3.0 stuff. I've gotten the basic API working with the TinkerGraph stuff, and I'm moving on to try and interface with my local Neo4j instance (Community 2.2.2). I'm working through the tutorial here: http://tinkerpop.incubator.apache.org/docs/3.0.0.M9-incubating/ but, the neo4j-gremlin plugin does not appear to exist as documented. Neither the gradle line: compile group : 'org.apache.tinkerpop', name: 'neo4j-gremlin',

What should I do to setup a new Gremlin version for Neo4j?

[亡魂溺海] 提交于 2019-12-11 11:54:34
问题 I am using Neo4j - Graph Database Kernel 1.8 It uses this gremlin version: gremlin> Gremlin.version() ==> 1.5 which is very old version. I want to upgrade to gremlin 2.0 or 2.1 from the github project, since I can't run this command on gremlin 1.5 : gremlin> g.v(1).outE.has("weight", T.gte, 0.5f).weight ==> No such property: T for class: groovysh_evaluate My question is what should I do, so I won't mess up all the entire environment of neo4j . 回答1: You can run: import com.tinkerpop.gremlin

How to write like queries using gremlin for Neptune as Neptune is not supporting the Lambda function

纵饮孤独 提交于 2019-12-11 11:35:01
问题 Is there any way to write like queries Like '%match%' in gremlin without using the lambda functions?. Neptune does not support Lambda functions 回答1: There are usually ways to express lambdas with Gremlin steps. Indeed, it is often better to do so because graph providers can't optimize the portions of your queries that contain lambdas (as it is just arbitrary code). Typically, the nature of the lambda contents determines whether or not it can be expressed easily with Gremlin steps. If the

filter vertices on number of outgoing edges in gremlin titan in java

╄→гoц情女王★ 提交于 2019-12-11 10:48:22
问题 I want to query and filter all vertices with more than 500 outgoing edges in titan using gremlin in java...how do i do this?I have started off as below pipe=pipe.start(graph.getVertices()); 回答1: You then need a filter function p.start( g.getVertices() .filter(new PipeFunction<Vertex,Boolean>() { public Boolean compute(Vertex v) { // write your logic here to count edges on the vertex and // return true if over 500 and false otherwise })); Using GremlinPipeline in Java is described more here 来源

Group Parent Vertex and Children through Edges into master/sub json array

对着背影说爱祢 提交于 2019-12-11 09:22:25
问题 First of i am using azure cosmos db. A person works_for multiple Offices. Each Office can be IsMaster or not. If it is a IsMaster it can have master_of edge to another Office. Each works_for edge has AccessLevel property for a person. Logic: Given a Person name, get all Offices that person works_for that are IsMaster = 'true'. Then return all IsMaster with AccessLevel taken from works_for and corresponding SubOffices that each IsMaster has through master_of edge and corresponding AccessLevel

TinkerPop: Gremlin revisiting visited edges

我的梦境 提交于 2019-12-11 08:46:06
问题 Sample Data: Query to create sample data g.addV("Test1").property("title", "A") g.addV("Test2").property("title", "B") g.addV("Test3").property("title", "C") g.addV("Test4").property("title", "D") g.V().has("Test1", "title", "A").addE("rel").to(g.V().has("Test2", "title", "B")) g.V().has("Test2", "title", "B").addE("rel").to(g.V().has("Test3", "title", "C")) g.V().has("Test3", "title", "C").addE("rel").to(g.V().has("Test4", "title", "D")) Query : Find how A is connected to A Expected answer:

Janusgraph 0.3.2 + HBase 1.4.9 - Can't set graph.timestamps

核能气质少年 提交于 2019-12-11 08:28:58
问题 I am running Janusgraph 0.3.2 in a docker container and trying to use an AWS EMR cluster running HBase 1.4.9 as the storage backend. I can run gremlin-server.sh, but if I try to save something, I get the stack trace pasted below. It looks to me like the locks are being created using different timestamps lengths causing it to look like no lock exists. I tried adding the graph.timestamps setting to the config file, but still got the same error. Here is my configuration gremlin-server.yml host:

How to Create and Delete edge properties (Titan 1.0) using c# in .net mvc?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 07:59:10
问题 I was using Titan 1.0 with gremlin server to create and delete vertex. I want to implement this logic in my .net project. I wonder if there is any pre build plugin for titan and gremlin server in asp.net? Currently i'm directly using command prompt to create and delete the required vertices and edges. how can I implement it in my .net MVC project? 回答1: I've created one class in my project for interacting with Gremlin server using REST API. you can make small changes to make it work for you.

Performing aggregrate queries using Gremlin / TitanDB

元气小坏坏 提交于 2019-12-11 06:45:30
问题 I have a Titan graph database witha set of vertices connected by an edge with a property named "property1". Is it possible to write a Gremlin (or anything else Titan would support) query to: Find all edges that have a value for "property1" that is seen 5 or less times. In SQL I would use "Group By", in MongoDB I would use one of the aggregate functions. I am thinking this may be a job for Furnace/Faunus? 回答1: You can do this by iterating all edges and using groupBy . Here's an example with

How to add multiple edges in a single gremlin query?

流过昼夜 提交于 2019-12-11 06:37:01
问题 My scenario is to add multiple edges between vertices in a single query: Assume the nodes below: These are the labels and ids I have Users : 4100 Songs : 4200 4355 4676 I have to establish edges between these vertices 4100 --> 4200, 4100 --> 4355, 4100 --> 4676. We can do it normally by creating single edge between node.it is not a efficient method if we want to create edge between more than 50 vertices at a time. I am using Tinkerpop 3.0.1 . 回答1: If you have the vertex ids, it is very