g.V().has("location","location_type",1).values("location_id") // if you only need the location_id valuesg.V().has("location","location_type",1).valueMap("location_id",...) // if you only need a few more values, but not allg.V().has("location","location_type",1).values("location_id") // if you need all property valuesg.V().has("location","location_type",1).values(true) // if you also need the vertex id
--
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 janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/c95794bd-8881-4ed0-9823-9d28765e48be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Here are a few alternatives:g.V().has("location","location_type",1).values("location_id") // if you only need the location_id valuesg.V().has("location","location_type",1).valueMap("location_id",...) // if you only need a few more values, but not allg.V().has("location","location_type",1).values("location_id") // if you need all property valuesg.V().has("location","location_type",1).values(true) // if you also need the vertex idThe first traversal will return a list of Integers, all others a list of maps.Cheers,Daniel
On Thu, Mar 29, 2018 at 10:42 AM, Alexandr Porunov <alexandr...@gmail.com> wrote:
Hello,
When I traverse vertices JanusGraph returns a set of vertices that isn't filled with properties. When I use next traverse:
List<Vertex> locations = graph.traversal().V().hasLabel("location")
.has("location_type", 1)
.toList();
I am getting a big set of my locations. But for each vertex where I call value() method, it sends a request to a database to fetch properties. So basically I am getting locations.size() requests to the database:
for(Vertex locationVertex : locations){
System.out.println("Location id: "+locationVertex.<Integer>value("location_id"));
}
Is it possible to fetch a set of vertices with filled properties in one request?
Best regards,
Alexandr
--
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 janusgraph-use...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/0a990def-fb64-4ad2-9c17-862013170239%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CA%2Bf9seVYJVxG2U2SVn5jsGzrRFd3TbdHPrb%3DSD8OyD%2BR63NOqw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/0a990def-fb64-4ad2-9c17-862013170239%40googlegroups.com.
--
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 janusgraph-use...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/a1c9c5b9-04f9-464f-bc06-acb1438fe44a%40googlegroups.com.