JanusGraph / JanusGraph/janusgraph
Using Vertex-centric Indices for Adjacent Vertex Ids
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
**Describe the feature:**
Currently, vertex-centric indices are used for adjacent vertex objects. For example,
```
v2 = g.V(5678).next()
(1) g.V(1234).out('edgeLabel').is(v2).next()
```
will utilize the built in vertex-centric indices. On the other hand,
```
(2) g.V(1234).out('edgeLabel').is(__.V(5678)).next()
```
will not because JanusGraph evaluates `__.V(5678)` after fetching all neighbors with the `'edgeLabel'` edge label. This is an issue if the vertex with id `5678` has many edges with the label `'edgeLabel'`.
This feature would make it so JanusGraph's evaluation of both traversals (1) and (2) uses the built in vertex-centric indices for adjacent vertices.
**Describe a specific use case for the feature:**
When ingesting data, it is much cleaner and simpler to cache vertex ids rather than the full vertex object (which requires serialization and deserialization).
Contributor guide
Research direction
No file or test is named. Start by locating JanusGraph's traversal evaluation for adjacent vertices and the existing vertex-centric index handling, then compare the two example traversals. Done means both forms use the vertex-centric index without fetching all neighbors first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100