question about vertex-centric index

227 views
Skip to first unread message

jx ping

unread,
Jul 19, 2018, 4:19:50 AM7/19/18
to JanusGraph users
long time no see 

9.2. Vertex-centric Indexes 

I have some question about this vertex centric index, where does this index store ? in hbase or elasticsearch ? how does janusgraph make this index for good proformance ?just like 
g.V(h).outE('battled').has('time', inside(10, 20)).inV() 
does janusgraph store vertex centric index in hbase and store out edges orders by time?
or janusgraph use elasticsearch for index ,  what's the different between EdgeMixedindex ? like
 mgmt.buildIndex("UniqueEdgeKey", Edge.class).addKey(edgeKey).buildMixedIndex()



jx ping

unread,
Jul 19, 2018, 4:27:10 AM7/19/18
to JanusGraph users
 Vertex-centric indexes can speed up such traversals by using localized index structures to retrieve only those edges that need to be traversed
what's the  localized index ? how it works? and where does it store?

在 2018年7月19日星期四 UTC+8下午4:19:50,jx ping写道:

jcbms

unread,
Jul 19, 2018, 4:32:14 AM7/19/18
to JanusGraph users
JanusGraph automatically builds vertex-centric indexes per edge label and property key. That means, even with thousands of incident battled edges, queries like g.V(h).out('mother') or g.V(h).values('age') are efficiently answered by the local index
what does this mean? if i add a property to an edge ,janusgraph will automitically make a local index ? I don't need to define the schema? 

在 2018年7月19日星期四 UTC+8下午4:19:50,jcbms写道:

Jason Plurad

unread,
Jul 21, 2018, 11:01:33 AM7/21/18
to JanusGraph users
Vertex-centric indexes (VCI) are stored in the storage backend (Cassandra, HBase). An external indexing backend is not required.

The key aspect of the VCI is the ordering of the edges based on an edge property. When you have a query that comes in that filters on that edge property, it is faster to select it out the matching edge when it is sorted. If they are not sorted, it would need to iterate through all the incident edges to be certain whether the matching condition is met.


> JanusGraph automatically builds vertex-centric indexes per edge label and property key.

I think you need to take that one by one.

* For incident edges on a vertex, they are sorted by edge label by default. In graph of the gods, "brother" edge would come before "lives" edge. Now let's say for example, a vertex had 1,000 "brother" edges and 2,000 "lives" edges. All the "brother" edges would all be found together, but if you wanted to more specifically find brothers by age, it would be useful to have a VCI on the "age" edge property.
* For properties on a vertex, they are sorted by property name. This comes more into play if you have a list or set cardinality.

jcbms

unread,
Jul 23, 2018, 4:59:01 AM7/23/18
to JanusGraph users
thank a lot ,you are master of janusgraph 

在 2018年7月21日星期六 UTC+8下午11:01:33,Jason Plurad写道:
Reply all
Reply to author
Forward
0 new messages