I can't seem to find a specific node in the graph without traversing the whole thing. Is there something I'm missing?

I'm using tinkerpop blueprints.

Orientdb gives some sort of unsemantic id to a node such as '#8:1' - how do I find this without knowing the id? vertex has a property like 'user=jason' that will identify it. I'm thinking I'll just use redis to store the user/location pair or otherwise use a supernode (no thanks)

Blueprints has the notion of key indices.

https://github.com/tinkerpop/blueprints/wiki/Graph-Indices

Given your example, define a key index for "user", then query it with the key index. Here's an example using OrientDB from a Gremlin prompt:

```
gremlin> g = new OrientGraph("memory://graph")
==>orientgraph[memory://graph]
gremlin> g.createKeyIndex("user", Vertex.class)
==>null
gremlin> g.addVertex([user:"Jason"])
==>v[#8:-3]
gremlin> g.addVertex([user:"Rick"])
==>v[#8:-4]
gremlin> g.stopTransaction(SUCCESS)
==>null
gremlin> g.V('user','Jason')
==>v[#8:1]
```

Similar Questions

I am trying to generate undirected graphs in pygraphviz but have been unsuccessful. It seems that no matter what I do, the graph always turns out directed. Example #1 G = pgv.AGraph(directed=False) G.

I have looked around and looked at various tutorials on how to upload a file using node/express. I feel like I am doing something wrong on either the HTML or JQuery side. I am using the following link

In the Lemon C++ Graph Library, given a node in an undirected graph say, how does one find other nodes that are edge connected?

I am generating random Geometric graph using networkx. I am exporting all the node and edges information into file. I want to generate the same graph by importing all the node and edges information fr

I have a test app using express that crashes on server.listen(80): ERROR: listen EADDRINUSE. I tried to kill all node processes with killall -9 node but there were no processes. I also have apache run

Can anybody please let me know how do I change circular node to rectangular node in D3 force directed graph? Please see the following code for the forced directed graph please find the html script her

I can write this Instagram API call using jQuery, but I'm not sure how to get Node and/or socket to do the same. Any help? function getData(url){ $.ajax({ url: url, dataType :jsonp, success: functio

I need an example of the shortest path of a directed cyclic graph from one node (it should reach to all nodes of the graph from a node that will be the input). Please if there is an example, I need it

I have to read the xml node name from the following XML, but I don't know how to do it. Here is the XML: <?xml version=1.0 standalone=yes ?> <games> <game> <name>Google P

I tried to google this but could not find anything. Do you have any idea how to create inverted cone graph like this?

How do I add a button beside each node of a TreeView?

how can i find out which class/method has called the actual method?

I'm searching for an algorithm to find pairs of adjacent nodes on a hexagonal (honeycomb) graph that minimizes a cost function. each node is connected to three adjacent nodes each node i should be

In Matlab, I have a function: function [ Result ] = Calc_Result(A, B, C, D) How do I graph the output of this function, for values A=0.00 to A=1.00, in steps of 0.01? Variables B,C,D are constants. If

I have a graph with 4 nodes which are connected with other nodes. Each connection has weight. For example: A -> 5 -> B A -> 3 -> C B -> 4 -> C B -> 3 -> D Each node has backw

I'm new to Node.js. I know there are more involved debuggers available (like node_debug and ndb), but is there a simple way to see runtime errors thrown in Node.js? With a simple example file like thi

In a multi-level jsTree how do I select a particular node (probably a leaf node) and expand all it's parents? Example: From this JSFiddle (http://jsfiddle.net/mmeah/fyDE6/) I want to programmatically

I've run node . in various NodeJS apps in the past, and it seems to know to run index.js, server.js, etc. Is there a package.json setting (or something similar) that I can configure so that NodeJS kno

The documentation for Control.Monad.List.ListT states that it does not yield a monad unless the argument monad is commutative. How do I find out whether a monad is commutative? Is there a Commutati

Given a graph and a destination node, how do you find all the shortest paths from all other vertices to the destination vertex.

I have a library several layers of require down from my project, and I'd like to set a breakpoint inside it. I'm new to node-inspector, and I'm trying to figure out how to find my way into the libra

Looking for an infrastructure for network analysis for heterogeneous (multiple node types (multi-mode), multiple edge type (multi-relation) and multiple descriptive features (multi-featured)) networks

I would like to start by saying thanks to everyone who takes some time to view this thread and try to help. I have searched the Internet, and couldn't find an example of selecting tree view node that

I need to get the node VALUE for the notificationId. The name of the node is ID in the XML. This is what I have right now: $(function DeleteNotification (userId) { $('#btnDelete').on('click', functi

I'm trying to traverse a graph with DFS. But when I tried to pass visited node list as a function's parameter, I found there is a problem. When I reached at the node which has no connected node except

How do I generate a contour graph like this: It's easy enough if the points are on a regular grid, but what if they aren't, like in my example? Is there a fairly simple algorithm to determine the col

I have a PHP form (index.php) that uses the Facebook Graph API to create an event. A form is used to capture user input, and this data is POSTed back to the API to create the event. This is the same c

Now i am working on core plots integration... In my graph plots are hided by the axis set i need to bring my plots front of the axis set is there any idea .... how do i achieve that.... my code: CGRe

Question : we have a directed graph , how to find a hole (pit) in a graph on Ɵ(n) time complexity . a pit on graph : if an vertex with n-1 degree for (input) and degree 0 for (output) , we have a pit

I would like to know if I can use tinkerpop within Akka Futures, so far when I commit my changes to the graph they don't get persisted. I understand tinkerpop is a thread-local library which mean I'd

https://github.com/isaacs/node-supervisor I want to watch everything inside the api directory and all its subdirectories (recursively). How can I do that? sudo supervisor -w app.js,api app.js This

HttpClient client = new HttpClient(); client.BaseAddress = new Uri(http://localhost:60792); Instead of localhost:60792 how do I find it dynamically on start up? Pointing me in the right direction w

I have a directed, unweighted, possibly cyclic graph that can contain loops and multiple duplicate edges (i.e. two edges from node 1 to node 2). I would now like to find the length of the longest trai

In graph theory, we use the Hungarian Algorithm to compute a weighted bipartite graph's minimum edge cover (a set of edges that is incident to every vertices, the one with the minimum total weight.) I

I have a dedicated server maintained by GoDaddy. I want to run Node Js on it. Is there any documentation available on how to install Node JS on my server? I have a CentOS dedicated server.

I am trying to make a program in Node that automatically fills in metadata for a song (album,artist,name,etc.) Is there a module out there that would let me do this? If not, how would I write one in C

I have a graph shaped as a triangle. 8 / \ 1 4 / \ / \ 4 2 0 / \ / \ / \ 9 1 9 4 In the above graph the longest path is {8, 4, 2, 9} My current algorithm calculates the max number of the adjacent no

So, I have a graph of vertices which have certain weights and edges. I'm trying to find the minimum weighted vertex cover. For example if I have a vertex cover of size 10 but each node has a weight of

I want every node to have a ipaddress string, latitude and longitude values. Also how do I get a pointer to such object on looking up the graph created by networkx?

I was exploring developing in Node.JS and found ExpressJS and RailwayJS (based on Express) which are frameworks for Node. The templating engine used Jade/EJS appears to be more for HTML. How might I g

I am using D3.JS libraries force directed graph, I am using the following code to find target nodes graph.links.forEach(function(d) { linkedByIndex[d.source.index + , + d.target.index] = 1; linked

How do I track the event of clicking a node or double-clicking a node item (meaning, that textual thing next to the plus sign) in a tree view, but not the treeview itself?

I've had a pretty good look around for an answer to this, and tried several solutions in my code, nothing found so far. I have a line graph that I am plotting, a CPTScatterPlot graph, and I have got p

I'm new to graph theory and playing around with the NetworkX package. I was wondering how to delete a node? I have a dataset that I'm uploading as a graph for various timeframes and trying to figure r

How do I find what version of GTK I have installed on a Solaris box?

I've searched a bit but can't find an existing tool for this. how to package node web-kit project for mac osx and what steps to follow to distribute this app to mac app store. Thanks in advance.

How do I find the time difference between two datetime objects in ASP.NET?

How would one do a bulk insert into mySQL if using something like https://github.com/felixge/node-mysql

As a first project on OOP I'm working on a linked list oop class, got most of the methods done but the remove node method is not working. When I run the code I get this error: AttributeError: 'Node' o

I have a graph structure in java, (graph as in edges and nodes) and I'm attempting to serialise it. However, I get StackOverflowException, despite significantly increasing the JVM stack size. I