0

quick question regarding querying a graph database in Titan using a Cassandra back end.

Splitting the problem down into it's simplest form, say I have a relationship that goes something like this:

node1 ----------> node2

When loading in data, I have assigned a number of properties to each edge using the e.setProperty("name",value) command. Say I have three properties called property1, property2 and property3. What I'd like to do is return the value of a certain property, say property1. My code looks like this:

g.E(1).getProperty("property1")

However it returns null. Does anyone know the correct way of adding edge properties and querying them appropriately?

TylerH
  • 20,799
  • 66
  • 75
  • 101
adaml288
  • 61
  • 1
  • 6

1 Answers1

1

getProperty() is only for a single object (vertex or edge). What you have, is a pipe. You can use either:

g.E().property("property1")

or:

g.E().property1

or:

g.E().next().getProperty("property1")
Daniel Kuppitz
  • 10,846
  • 1
  • 25
  • 34