titan elasticsearch not using index titan elasticsearch not using index elasticsearch elasticsearch

titan elasticsearch not using index


Yes, you need to have your index enabled. To do this, index must be in state REGISTERED, not INSTALLED as it is in your case. Normally this transition happens automatically, when all titan instances using the same storage backend acknowledge index changes.

It is possible howewer, that you have some instances which are no longer active. You can list all instances in gremlin console:

m=g.getManagementSystem()m.getOpenInstances()

If there are any dead instances, you should manually remove them, using

mgmt.forceCloseInstance("dead-instance-id")mgmt.commit()

You can find more in documentation, section 27.2.

From my experience it is best to shut down all instances except gremlin session before performing index maintenance.

Now, you can manually register index (see section 28.7.1):

m = g.getManagementSystem()mediaSerialNBStringIdx = m.getGraphIndex("mediaSerialNBStringIdx")m.updateIndex(mediaSerialNBStringIdx, SchemaAction.REGISTER_INDEX)m.commit()

To check:

m = g.getManagementSystem()k = m.getPropertyKey("mediaSerialNB")m.getGraphIndex("mediaSerialNBStringIdx").getIndexStatus(k)// should return REGISTERED

Now you can succesfully enable your index:

m = g.getManagementSystem()mediaSerialNBStringIdx = m.getGraphIndex("mediaSerialNBStringIdx")m.updateIndex(mediaSerialNBStringIdx, SchemaAction.ENABLE_INDEX)m.commit()