public void dropIndex ( final String indexName ) { makeActive ( ) ; executeOutsideTx ( new OCallable < Object , OrientBaseGraph > ( ) { @ Override public Object call ( OrientBaseGraph g ) { try { final OIndexManager indexManager = getRawGraph ( ) . getMetadata ( ) . getIndexManager ( ) ; final OIndex index = indexManager . getIndex ( indexName ) ; ODocument metadata = index . getConfiguration ( ) . field ( "metadata" ) ; String recordMapIndexName = null ; if ( metadata != null ) { recordMapIndexName = metadata . field ( OrientIndex . CONFIG_RECORD_MAP_NAME ) ; } indexManager . dropIndex ( indexName ) ; if ( recordMapIndexName != null ) getRawGraph ( ) . getMetadata ( ) . getIndexManager ( ) . dropIndex ( recordMapIndexName ) ; saveIndexConfiguration ( ) ; return null ; } catch ( Exception e ) { g . rollback ( ) ; throw new RuntimeException ( e . getMessage ( ) , e ) ; } } } , "drop index '" , indexName , "'" ) ; }
Drops an index by name .