#### issues with appending results of two queries into one

arjun srivastava <srivasta...@...>

final GraphTraversal<Vertex, Vertex> query1 = graph.traversal().V();
final GraphTraversal<Vertex, Vertex> query2 = graph.traversal().V();

query1.has(vertexLabel, filterProperty, P.between(fromDate, toDate));

= giving me 8 vertices all at root level of graph

query2.has(vertexLabel, filterProperty, P.between(fromDate, toDate)).outV();
= giving me 3 vertices at level 1 of graph  ( which are connected to one vertex of on  root )

how can i combine the results of above two .

i am able to unmarshall objects with a single query result but not both combined.

AMIYA KUMAR SAHOO <amiyakr...@...>

Hi,

I think is to combine both results using union step.

graph.traversal().V().
has(vertexLabel, filterProperty, P.between(fromDate, toDate)).fold(). union (unfold(), unfold().out())

HTH,
Amiya

On Thu, 16 Jul 2020, 19:29 arjun srivastava, <srivasta...@...> wrote:
final GraphTraversal<Vertex, Vertex> query1 = graph.traversal().V();
final GraphTraversal<Vertex, Vertex> query2 = graph.traversal().V();

query1.has(vertexLabel, filterProperty, P.between(fromDate, toDate));

= giving me 8 vertices all at root level of graph

query2.has(vertexLabel, filterProperty, P.between(fromDate, toDate)).outV();
= giving me 3 vertices at level 1 of graph  ( which are connected to one vertex of on  root )

how can i combine the results of above two .

i am able to unmarshall objects with a single query result but not both combined.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....