How Gremlin query same sql like for search feature
Try:
g.V().filter({ it.getProperty("foo").startsWith("search") })
or
g.V().filter({ it.getProperty("foo").contains("search") })
For Cosmos Db Gremlin support
g.V().has('foo', TextP.containing('search'))
You can find the documentation Microsoft Gremlin Support docs And TinkerPop Reference