How Gremlin query same sql like for search feature

前端 未结 7 905
栀梦
栀梦 2020-12-31 15:12

Im using OrientDB type graph. I need syntax of Gremlin for search same SQL LIKE operator

LIKE \'search%\' or LIKE \'%search%\'

I\'ve check

相关标签:
7条回答
  • 2020-12-31 15:40

    For people finding this answer here is an updated version of how you can search (very similar to the accepted answer)

    For the gremlin console (gremlin.sh):

    g.V().filter({ it.get().value("foo").contains("search") })
    

    Also if you have your index backend being ElasticSearch (might work for other indexing backends as well) this works as well:

    g.V().has("foo", Text.textContains("search"))
    
    0 讨论(0)
提交回复
热议问题