- Persistence of graph view
Re: Persistence of graph view
toggle quoted messageShow quoted text
When you have the vertex id, you do not need any index. The index is a lookup table from property value to vertex id.
Op maandag 7 oktober 2019 08:15:50 UTC+2 schreef Lilly:
Thanks for your reply!
Your suggestions would fetch the subgraph efficiently. However, on this subgraph I could no longer use any of my other indecees.
Say I have an index on "property". Than g.V(ids).has("property",...) would no longer make use of the index on "property" (only g.V().has("property",..) does.
Especially if the subgraph is still rather large, this would be desirable though.
Any thoughts on how to achieve this?
Am Sonntag, 6. Oktober 2019 09:47:25 UTC+2 schrieb ma...@...:
Interesting question. For the JanusGraph backends to lookup the vertices of the subgraph efficiently, they need the id's of the vertices. The traversal is then g.V(ids) . There are different ways to get these id's:
- store the id's on ingestion
- query the id's once and store them
- give the subgraph vertices a specific property and run an index on that property. I doubt, however, that this will be efficient for large subgraphs. @Anyone ever tried?
- maybe the JanusGraph IDPlacementStrategy could provide a way to only query the subgraph vertices without knowing their explicit ids. Seem complicated compared to the first two options.
Op vrijdag 4 oktober 2019 17:48:52 UTC+2 schreef Lilly:
I persisted a janusgraph g1 (with Cassandra backend if that is relevant). Now I would like to
persist a "view" of this graph g1, i.e. a subgraph g2 of g1 which only
contains some of the nodes and edges of g1. This subgraph is to also have
possess all the indecees of the affected nodes and edges.
I am aware of the subgraphstrategy, which can create such a view at runtime. Is it possible to persist this view? I would like to circumvent having to create this view all over again each time. Also, with this view created at runtime, I can no longer exploit other indecees.
If this is not possible, is there another way to achieve this?
Thanks a lot!!
Join email@example.com to automatically receive all group messages.