'Destroys index
:param index: the index to destroy
:type index: :py:class:`CodernityDB.index.Index`` instance, or string'

def destroy_index(self, index):

    if isinstance(index, basestring):
        if (not (index in self.indexes_names)):
            raise PreconditionsException(('No    index    named    %s' % index))
        index = self.indexes_names[index]
    elif (not (index in self.indexes)):
        self.__not_opened()
        raise PreconditionsException('Argument    must    be    Index    instance    or    valid    string    index    format')
    if (index.name == 'id'):
        self.__not_opened()
        raise PreconditionsException('Id    index    cannot    be    destroyed')
    full_file = (('%.2d%s' % (index._order, index.name)) + '.py')
    p = os.path.join(self.path, '_indexes', full_file)
    os.unlink(p)
    index.destroy()
    del self.indexes_names[index.name]
    self.indexes.remove(index)
