Gremlin如何查询相同的SQL搜索功能 [英] How Gremlin query same sql like for search feature
本文介绍了Gremlin如何查询相同的SQL搜索功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用OrientDB类型图.我需要使用Gremlin的语法来搜索相同的SQL LIKE运算符
Im using OrientDB type graph. I need syntax of Gremlin for search same SQL LIKE operator
LIKE 'search%' or LIKE '%search%'
我已经检查了has和filter(在 http://gremlindocs.com/中).但是,必须确定确切的值是通过type属性传递的.我认为这与搜索逻辑是不正确的.
I've check with has and filter (in http://gremlindocs.com/). However it's must determine exact value is passed with type property. I think this is incorrect with logic of search.
谢谢你.
推荐答案
尝试:
g.V().filter({ it.getProperty("foo").startsWith("search") })
或
g.V().filter({ it.getProperty("foo").contains("search") })
这篇关于Gremlin如何查询相同的SQL搜索功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文