'ids in id_dict are "marked". They can be searched for by
using the search term ``marked:true``. Pass in an empty dictionary or
set to clear marked ids.
:param id_dict: Either a dictionary mapping ids to values or a set
of ids. In the latter case, the value is set to \'true\' for all ids. If
a mapping is provided, then the search can be used to search for
particular values: ``marked:value``'

def set_marked_ids(self, id_dict):

    if (not hasattr(id_dict, 'items')):
        self.marked_ids_dict = dict.fromkeys(id_dict, u'true')
    else:
        self.marked_ids_dict = dict(izip(id_dict.iterkeys(), imap(unicode, id_dict.itervalues())))
    marked_col = self.FIELD_MAP['marked']
    for r in self.iterall():
        r[marked_col] = None
    for (id_, val) in self.marked_ids_dict.iteritems():
        try:
            self._data[id_][marked_col] = val
        except:
            pass
