Centric Indexes failing to support all conditions for better performance.
chrism <cmil...@...>
JanusGraph documentation: https://docs.janusgraph.org/index-management/index-performance/
is describing usage of Vertex Centrix Index [edge=battled + properties=(rating,time)]
g.V(h).outE('battled').has('rating', 5.0).has('time', inside(10, 50)).inV()
From my understanding profile() of above is reporting \_isFitted=true
to indicate that backend-query delivered all results as conditions:
\_condition=(rating = 0.5 AND time > 10 AND time < 50 AND type[battled])
Two things are obvious from above: centric index is supporting multiple property keys, and equality and range/interval constraints.
However isFitted is false for all kind of conditions or combinations which are not really breaking the above rules, still in range constraints:
a) g.V(h).outE('battled').has('rating',lt(5.0)).has('time', inside(10, 50)).inV() // P.lt used for first key
b) g.V(h).outE('battled').has('rating',gt(5.0)) // P.gt used
c) g.V(h).outE('battled').or( hasNot('rating'), has('rating',eq(5.0)) ) // OrStep() used
Even b) can be "fitted" by has('rating',inside(5.0,Long.MAX_VALUE))
all that is very confusing, and probably not working as expected, what I am doing wrong?
as from my experience only one property key can be used for query conditions and using index, the second is ignored.
Having isFitted=false is not really improving performance, from my understanding,
when one only condition allows to get most of my edges and is asking to filter them in memory, as this is stated by implementation of BasicVertexCentricQueryBuilder.java.
Are there limitations not described in the JG doco? It is a glitch?
Can you offer explanation how to utilize Centric Indexes for edges in full support?
Christopher
Are there limitations not described in the JG doco? It is a glitch?
Can you offer explanation how to utilize Centric Indexes for edges in full support?
Christopher