private void deleteEntity ( String type , String id ) throws StorageException { try { JestResult response = esClient . execute ( new Delete . Builder ( id ) . index ( getIndexName ( ) ) . type ( type ) . build ( ) ) ; if ( ! response . isSucceeded ( ) ) { throw new StorageException ( "Document could not be deleted because it did not exist:" + response . getErrorMessage ( ) ) ; //$NON-NLS-1$ } } catch ( StorageException e ) { throw e ; } catch ( Exception e ) { throw new StorageException ( e ) ; } }
Deletes an entity .