krlawrence / graph

Practical Gremlin - An Apache TinkerPop Tutorial
Apache License 2.0
830 stars 251 forks source link

Add an example showing how to compare two properties on the same vertex #202

Open krlawrence opened 4 years ago

krlawrence commented 4 years ago

This seemingly simple task cannot be done using a has step and users get confused when trying to do something like this:

gremlin> g.addV('test').property('a',5).property('b',10)
==>v[53770]   
gremlin> g.V().hasLabel('test').as('x').where(gt('x')).by('b').by('a')
==>v[53767]

Some examples along these lines should be added to the "3.16.1. Using where and by to filter results" section.