I've tried with the graph of the gods (steps shown below), and the indexes seems to be persisted and working fine (don't see any warning when querying by name or age). So I guess I have some issue with the way I create the index on my database... but I really don't understand what it is. I've followed the documentation on how to create them.
My ".properties" file: gremlin.graph=org.janusgraph.core.JanusGraphFactory storage.backend=berkeleyje storage.directory=/graph/db index.search.backend=lucene index.search.directory=/graph/index
$ ./bin/gremlin.sh gremlin> graph = JanusGraphFactory.open("/graph/graph.properties") gremlin> GraphOfTheGodsFactory.load(graph) gremlin> mgmt = graph.openManagement() gremlin> mgmt.printIndexes() ==>------------------------------------------------------------------------------------------------ Vertex Index Name | Type | Unique | Backing | Key: Status | --------------------------------------------------------------------------------------------------- name | Composite | true | internalindex | name: ENABLED | vertices | Mixed | false | search | age: ENABLED | --------------------------------------------------------------------------------------------------- Edge Index (VCI) Name | Type | Unique | Backing | Key: Status | --------------------------------------------------------------------------------------------------- edges | Mixed | false | search | reason: ENABLED | | | | | place: ENABLED | --------------------------------------------------------------------------------------------------- Relation Index | Type | Direction | Sort Key | Order | Status | --------------------------------------------------------------------------------------------------- battlesByTime | battled | BOTH | time | desc | ENABLED | ---------------------------------------------------------------------------------------------------
Sent: Friday, July 23, 2021 at 10:43 AM From: "Boxuan Li" <liboxuan@...> To: janusgraph-users@... Subject: Re: [janusgraph-users] Query requires iterating over all vertices
Can you show the profile output? Just add .profile() to the end of your query.