<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove(self, obj, commit=True):
 """ Remove indexes for `obj` from the database. We delete all instances of `Q<app_name>.<model_name>.<pk>` which should be unique to this object. Optional arguments: `commit` -- ignored """

        database = self._database(writable=True)
        database.delete_document(TERM_PREFIXES[ID] + get_identifier(obj))
        database.close()