That helped quite a bit, thank you!
On Tuesday, April 21, 2015 at 7:10:59 PM UTC-5, Kyle wrote:
>
> g.v['12:615']
>
>
> should be
>
> g.v('12:615')
>
>
> note the lower case "v" and the () instead of []
>
>
> In
>
>> g.V['12:615']
>
>
>
> the
>
>> g.V
>
>
> is getting all vertices in g, then getting the property
> '12:615'
> from them, since this does not exist you get nulls.
>
> I would beware using g.V since it will return ALL vertices
>
>
> http://orientdb.com/docs/2.0/orientdb.wiki/Graph-Database-Tinkerpop.html
> Has some info that will be useful to you.
>
> Say you have a class
> MyV
> with indices
>
> MyV.myid UNIQUE_HASH_INDEX STRING
> MyV.kind NOTUNIQUE STRING
>
> then
>
>> g.getVertices("MyV.kind", "baz")._()
>
> will get you a gremlin pipe of everything in the index MyV.kind
> getVertices needs the "._()" in order to turn the result into a gremlin
> pipeline.
>
> to get one vertex you can do
>
>> g.getVertexByKey("MyV.myid", "foobar")
>
>
> or
>
>> g.getVertices("MyV.myid", "foobar")._()[[0] //will error if doesn't exist
>
>
> If you do
>
>> g.getVertices("myid", "foobar")
>
> orientdb should check if you have an index "V.myid" and use that if it
> exists.
>
>
> It is kinda tricky telling if the indices are used sometimes.
>
> Hope this helps!
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.