Indexing on vertex label

Hi, I was under the assumption that vertex label are indexed by default. But this doesn't seems to be the case. I also can't to find a way to index label from consulting the documentation. Is this not possible? And if so what is the reason for this? Thank you.
7 Replies
Bo
Bo8mo ago
No, you cannot index the label, unless you are willing to modify JanusGraph source code.
Bo
Bo8mo ago
GitHub
Index by label · Issue #283 · JanusGraph/janusgraph
In Janus I can create a composite index for a single property. Why then can I not create a composite index for a vertex label without a property? My use case is that we're using vertex labels t...
Painguin | Tiến
Is there a reason for this limitation if you don't mind me asking? As in are the maintainers against adding label indexing due to some technical reason or is it simply because no one has time to do that yet?
porunov
porunov8mo ago
I believe the later one. There are users who want to have that feature, but no volunteers to work on that feature yet. Of you read the issue you will find that maintainers are not against it, but on a contrary think that it should be there.
Painguin | Tiến
Thanks for clarifying, this is definitely a crucial feature imho. Hope someone with a good grasp of knowledge on Janus Graph will pick this up. In saying that, I would like to take a look myself as a possible learning opportunity, would you be able to point me to the files required in the source code to make this happen?
Bo
Bo8mo ago
I think to get started, you need to understand how a label is created, and how a index is created. These all happen in ManagementSystem.java. My favourite way of understanding the code is to pick up some test or write a small test in JanusGraphTest.java and use debugger to navigate the code flow.
Painguin | Tiến
Awesome this is helpful insight. Even if I can't help, would still be a good learning experience 😄
Want results from more Discord servers?
Add your server