Problem with graph traversal

瀏覽次數:30 次
跳到第一則未讀訊息

kusha pande

未讀,
2015年3月26日 凌晨1:12:002015/3/26
收件者:aureliu...@googlegroups.com
Hi 

I am trying to retriev only indexed vertices in the graph

I used the below query

Iterator<Vertex> vertices = titanTransaction.query().has("name").vertices().iterator();

This query traverses to the complete graph and fetches the result, Can anyone suggest me a better way,  The name vertex is indexed.

Thanks

Daniel Kuppitz

未讀,
2015年3月26日 清晨7:16:112015/3/26
收件者:aureliu...@googlegroups.com
If it's indexed in ES, you can do something like this:

g.indexQuery("vertexByName", "v.name:*").vertices()

If it's just a normal Titan index, then this won't be possible.

Cheers,
Daniel


--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/8767478e-8197-4828-a0ad-2848ddff8b27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kusha pande

未讀,
2015年3月26日 上午8:26:292015/3/26
收件者:aureliu...@googlegroups.com
It is not indexed in ES, Is there no other way ??

Kevin Miller

未讀,
2015年3月28日 下午2:10:102015/3/28
收件者:aureliu...@googlegroups.com
We accomplish this by setting a vertex_type property on all of our vertices and have an index on that key. 

We then query by doing:

g.V('vertex_type',0).toList()

or something like

g.V('vertex_type',0).out('item_belongs_to_list')
回覆所有人
回覆作者
轉寄
0 則新訊息