def delete_index ( self ) : es = self . _init_connection ( ) if es . indices . exists ( index = self . index ) : es . indices . delete ( index = self . index )
remove from index object in python
Delete the index if it exists .
def delete_index(self):
        """
        Delete the index, if it exists.
        """
        es = self._init_connection()
        if es.indices.exists(index=self.index):
            es.indices.delete(index=self.index)