Global Search
Is there a way where i can scan all the vertex or edge properties that match a given keyword in gremlin.
For ex :
g.V().has('name','John')
where i'm explicitly giving filter as name, can someone help me with gremlin query to retrieve anything that matches 'John' ?
Solution:Jump to solution
you could do:
```
// 3.7.0+
gremlin> g.union(V(), E()).has('name','josh')
==>v[4]...
1 Reply
Solution
you could do:
This will probably not be an optimized query though (yet) for most graphs so you would want to take care in executing that. I think it would be preferred to execute this as two separate queries unless you have a graph that will optimize the
union()
.