'Delete all items in the specified field with the specified ids.
Returns the set of affected book ids. ``restrict_to_book_ids`` is an
optional set of books ids. If specified the items will only be removed
from those books.'

@write_api
def remove_items(self, field, item_ids, restrict_to_book_ids=None):

    field = self.fields[field]
    if ((restrict_to_book_ids is not None) and (not isinstance(restrict_to_book_ids, (MutableSet, Set)))):
        restrict_to_book_ids = frozenset(restrict_to_book_ids)
    affected_books = field.table.remove_items(item_ids, self.backend, restrict_to_book_ids=restrict_to_book_ids)
    if affected_books:
        if hasattr(field, u'index_field'):
            self._set_field(field.index_field.name, {bid: 1.0 for bid in affected_books})
        else:
            self._mark_as_dirty(affected_books)
    return affected_books
