siva pasupuleti
ATApache TinkerPop
•Created by siva pasupuleti on 4/25/2023 in #questions
How to to get total count for pagination with gremlin query using java Apache thinker pop
I need to implement pagination in my application. I'm unable to get the total count. can someone help me how to get the total count of records.
12 replies
ATApache TinkerPop
•Created by siva pasupuleti on 4/25/2023 in #questions
Need help to implement a generic gremlin query with Apache thinkerPop Java.
Hi Everyone,
From the UI I will get one DSL query, I'm converting that into a Gremlin query. and I'm executing this gremlin query with the help of a Graph traversal source and I'm returning the query response back to UI. For now, I gave a chance to the user he can search with only three attributes (name, type, and system) so based on these three I implemented multiple gremlin queries and if else conditions. yesterday I got a new requirement for business people who want to search with multiple attributes. in these scenarios, I need to implement queries in a generic way.
if I have three properties data I'm executing like this with Java code.
String name ="john";
List<String> typeList = new ArrayList();
List<String> systemList = new ArrayList();
List<Map<Object, Object>> node = g.V().has("name", name).has("type", P.within(typeList)).has("system", P.within(systemList ))
.local(.properties().group().by(.key()).by(__.value())).dedup().toList();
now my requirement is, I need to execute the same query with hundreds of properties. instead of writing multiple if else conditions based on property availability. is there any generic way to handle this kind of scenario.
Thanks.
4 replies