Open graphdb2 opened 5 years ago
what is the mixed index definition?
import org.janusgraph.graphdb.database.management.ManagementSystem
graph.getOpenTransactions()
graph.tx().rollback() //Never create new indexes while a transaction is active
mgmt = graph.openManagement()
ciscode = mgmt.getPropertyKey('CisCode')
from = mgmt.getPropertyKey('from')
hash = mgmt.getPropertyKey('_hash')
state = mgmt.getEdgeLabel('state')
indexName = 'byCisCodeFromHashES5'
mgmt.buildIndex(indexName , Edge.class).addKey(ciscode).addKey(from).addKey(hash).indexOnly(state).buildMixedIndex("janus")
mgmt.commit()
//Wait for the index to become available
mgmt.awaitGraphIndexStatus(graph, indexName).call()
//Reindex the existing data
mgmt = graph.openManagement()
mgmt.updateIndex(mgmt.getGraphIndex(indexName), SchemaAction.REINDEX).get()
mgmt.commit()
mgmt = graph.openManagement()
mgmt.updateIndex(mgmt.getGraphIndex(indexName), SchemaAction.ENABLE_INDEX)
mgmt.commit()
mgmt = graph.openManagement()
report = mgmt.awaitGraphIndexStatus(graph, indexName).status(SchemaStatus.ENABLED).call()
mgmt.rollback()
what are the property key definitions?
I'll mention that it would be much easier if you would provide a reproducible example including the schema, indexes, and some example data.
The stack trace goes through the JanusGraph code, so it seems that there's a bug scenario here. We just need to isolate a reproducible test case.
I reproduced this with a stale ES index, so if I start from an empty graph but with a populated ES index I get this exception.
Thanks, using a stale ES index is a critical piece of information. In this scenario, did you run reindexing to try to clear it up?
Sounds like there needs to be some enhancement around validating if an existing index matches with the graph storage.
Hello,
I am getting this exception when query edges
Janusgraph: version 0.3.0