outE() not showing edge in cross-logical-partition query

Kunal sharma 0 Reputation points
2023-08-22T06:20:18.37+00:00

0

I have two vertices in two different logical partitions, (both have different partition key values). I have created an Edge between them. Now when I run the outE() on the source vertex, it returns null, while when I run the inE() on destination Vertex, it returns me the edge with outV as the source vertex.

These are the gremlin queries for the same,

g.addV(‘vertex_label_1’).property(‘id’,’V1’).property(‘pk’,’pkX’)
g.addV(‘vertex_label_2’).property(‘id’,’V2’).property(‘pk’,’pkY’)

Add Edge:

g.V(‘V1’).has(‘pk’,’pkX’).addE(‘edge_label_12’).property(‘id’,’E12’).to(g.V(‘V2’).has(‘pk’,’pkY’))

Now when I run g.V('V1').outE() -> it returns null while when I run g.V('V2').inE() -> it returns the above edge

I am not sure what am I missing here ?

Ref: https://learn.microsoft.com/en-us/answers/questions/1286272/how-to-add-an-edge-between-2-vertices-in-different

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,848 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.