I am trying to fetch vertices that start with a specific prefixes in JAVA. I have used the between predicate. Is there a better way to do the same. For example if I need the vertices starting with 'a'. I would use
.has(label, propertyKey, P.between("a", "b"))
Since the release of TinkerPop 3.4.0, Gremlin also supports simple text predicates
In this case, you should use startingWith
.
.has(label, propertyKey, TextP.startingWith("a"))
example: https://gremlify.com/ad
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.