1

I am not clear on JanusGraph (0.1.1 or upcoming 0.2.0) index behavior.

All indexes (Composite-index, Mixed-index and Vertex-centric-index) are used only to lookup entry point elements ?

For example, in the following traversal, indexes are use only at has('Lang', 'name', 'python') ?

g.V().has('Lang', 'name', 'python').in('use').has('person', 'age', P.gt(28)).toList()

If so, when an intermediate vertex has so many edges (super-node), JanusGraph must read so many elements from backend storage in order to filter ?

4

1 回答 1

4

After the initial lookup you can only leverage vertex centric indexes to improve the performance of traversals. You could, for example, duplicate the person's age property (also store it on the use edges and create a VCI over this property).

mgmt.buildEdgeIndex(uses, "usedByAge", Direction.IN, Order.incr, age);
于 2017-10-04T21:03:21.303 回答