How to create, register and enable an index in Janusgraph?
I want to create an index to find a vertex by label and a property value.
I saw from documentation that i have to Install->Register->Enable the index, but somehow i can't get it to be Register and Enabled.
1) Install
2) Register? Enable?
Didn't work, still remains just installed, i tried enable also, and it said to register first, get from logs a timeout on the awaitGraphIndexStatus();
If someone can give a simple example of how to install->register->enable an index it will help i am stuck.
4 Replies
Your code doesn’t enable an index. You can use .profile() to check if your query uses an index or not. Most likely your query doesn’t use and index
thank you for helping me, but somehow i can't make it registered before enabling it,
Update action [ENABLE_INDEX] cannot be invoked for index with status [INSTALLED]
if someone can give a simple example on how to do all 3 steps it will help.In case you are using JanusGraph <= 0.6.x then indexes lifecycle process is described here: https://docs.janusgraph.org/schema/index-management/index-lifecycle/
In case you are using JanusGraph >= 1.0.0 (not released yet, but
rc-2
release is available) then you can find a new index lifecycle documentation here: https://docs.janusgraph.org/master/schema/index-management/index-lifecycle/This is what i do the build is ok, but
ManagementSystem.awaitGraphIndexStatus(graph, "myIndex").call();
doesn't run ok it timeouts, so my index is not registered, and i can't enable it, and i see the above messages on the logs.
i use(but i tried many other berkeley also, and cassandra older versions i couldnt make it register) :