java.lang.IllegalArgumentException: Vertex constraints only apply to edges

16 views
Skip to first unread message

manish kumar

unread,
Jul 7, 2016, 9:25:40 PM7/7/16
to Aurelius
        Vertex v1 = graph.vertices("40964208").next();
        Vertex v2 = graph.vertices("40968304").next();

        ((TitanVertex)v1).query().direction(Direction.IN).labels("v1-v2").adjacent(v2).count();

It is throwing

Exception in thread "main" java.lang.IllegalArgumentException: Vertex constraints only apply to edges
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at com.thinkaurelius.titan.graphdb.query.vertex.BasicVertexCentricQueryBuilder.constructQueryWithoutProfile(BasicVertexCentricQueryBuilder.java:393)
at com.thinkaurelius.titan.graphdb.query.vertex.BasicVertexCentricQueryBuilder.constructQuery(BasicVertexCentricQueryBuilder.java:385)
at com.thinkaurelius.titan.graphdb.query.vertex.VertexCentricQueryBuilder.execute(VertexCentricQueryBuilder.java:59)
at com.thinkaurelius.titan.graphdb.query.vertex.VertexCentricQueryBuilder.relations(VertexCentricQueryBuilder.java:98)
at com.thinkaurelius.titan.core.TitanVertexQuery.count(TitanVertexQuery.java:105)

Daniel Kuppitz

unread,
Jul 8, 2016, 10:04:39 AM7/8/16
to aureliu...@googlegroups.com
What if you try .edgeCount() instead of .count()?

Cheers,
Daniel


--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/005c4be4-e482-436b-aa49-37bb92858829%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages