Im using OrientDB type graph. I need syntax of Gremlin for search same SQL LIKE operator
LIKE \'search%\' or LIKE \'%search%\'
I\'ve check
I know I'm way late on this, but I was trying to figure this out as well and hope it helps someone out there. This is implemented in Java. TinkerPop version 3.2.5. I have no idea how to do this without writing some Java.
1) Create an enum that implements BiPredicate. (Note, this predicate allows wildcards and is case insensitive.)
public enum StringCompare implements BiPredicate
2) Create your regular expression following the Java rules. I found this link pretty helpful. http://www.developer.com/java/data/using-java-regular-expressions.html
3) Use the has() method, pass it the property key, and create a new P object.
String regex = "Mar.*"; //2
GraphTraversal gtv = g.V().has("name", new P<>(StringCompare.wildcard, regex)); //3