Index Creation Help

I need some help understanding the difference between Graph Index, Composite Index, and Vertex Centrix Index, and how to create them. I am currently working in Python but I am unsure on how to utilize these three different types of indices to speed up my queries, any suggestions/explanations would be greatly appreciated Looking at this page from a previous thread that I had created here (https://docs.janusgraph.org/schema/index-management/index-performance/#composite-index) I wasn't too sure where to execute some of the commands listed on the website. Is this going to work with Python?
1 Reply
b4lls4ck
b4lls4ckOP4w ago
Hi, I have tried to create indexes but I am running into issues. I am using the Docker image to jave a JanusGraph instance on my machine and I am using the gremlin console within the Docker container to create a composite index as follows: 1. I go into the Docker container via the
docker exec -it janausgraph-container bash
docker exec -it janausgraph-container bash
command 2. Once in the Docker container I run
./bin/gremlin.sh
./bin/gremlin.sh
to start up the gremlin console 3. I run
:remote connect tinkerpop.server conf/remote.yaml
:remote connect tinkerpop.server conf/remote.yaml
and then
:remote console
:remote console
which then outputs
==>All scripts will now be sent to Gremlin Server = [localhost/127.0.0.1:8182] - type ':remote console' to return to local mode
==>All scripts will now be sent to Gremlin Server = [localhost/127.0.0.1:8182] - type ':remote console' to return to local mode
4. I then run
mgmt = graph.openManagement()
mgmt = graph.openManagement()
which outputs
==>org.janusgraph.graphdb.database.management.ManagementSystem@16015e12
==>org.janusgraph.graphdb.database.management.ManagementSystem@16015e12
5. I then run
nameProperty = mgmt.makePropertyKey("name").dataType(String.class).make()
nameProperty = mgmt.makePropertyKey("name").dataType(String.class).make()
Which unfortunately appears to give me an error saying in the stack trace:
groovy.lang.MissingPropertyException: No such property: mgmt for class: Script5
groovy.lang.MissingPropertyException: No such property: mgmt for class: Script5
I am very confused as to why this is happening and would appreciate any assistance/troubleshooting Hi, I fixed the issue by changing my first third command listed above to
:remote connect tinkerpop.server conf/remote.yaml session
:remote connect tinkerpop.server conf/remote.yaml session
. However I do have some persisting issues and confusions which I will send soon.
Want results from more Discord servers?
Add your server