OrientDB Gremlin - Retrieve Vertex for a class in gremlin not hitting indexes

十年热恋 提交于 2019-12-06 05:08:25

Ok, after some hit and trial, I was able to figure this out to work via rexster/gremlin. I changed my query to something like:

new GremlinPipeline(g.getVertices('city_state.city','PALMETTO')).has('state_code','FL')

or
g.getVertices('city_state.city','PALMETTO')._().has('state_code','FL')

The g.getVertices method does accept 'class.field' notation (which is required to hit indexes) but it returns an iterator not a pipe so I have to put it in GremlinPipeline, or the alternate _(), in order to write further steps in gremlin.

Hopefully, this would help other folks as well. Made me burn 2 days, its hard when you are really trying to go for a new product coming from neo4j (which has mastered its queries and support).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!